fixed _error_html_response()

+ renamed eval_file_mode() in eval_file_access()
+ memo update
This commit is contained in:
lperrey
2022-08-15 22:12:55 +02:00
parent c05536ca01
commit 48af92b3bc
10 changed files with 30 additions and 42 deletions

View File

@@ -153,10 +153,9 @@ std::string http_methods_to_str(unsigned int methods)
file_type eval_file_type(const std::string &path)
{
const char *tmp_path = path.c_str(); // variable superflu ?
struct stat s;
if (stat(tmp_path, &s) != -1)
if (stat(path.c_str(), &s) != -1)
{
if (S_ISREG(s.st_mode))
return (IS_FILE);
@@ -171,8 +170,7 @@ file_type eval_file_type(const std::string &path)
return (IS_OTHER);
}
// rename in "eval_file_access" ?
size_t eval_file_mode(const std::string &path, int mode)
size_t eval_file_access(const std::string &path, int mode)
{
if (::access(path.c_str(), F_OK) == -1)
{