fixed _error_html_response()
+ renamed eval_file_mode() in eval_file_access() + memo update
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user