Commit 3fa5c69f authored by Sergey Lyubka's avatar Sergey Lyubka

Fixed handle_delete() stat call

parent e31f3058
...@@ -2609,7 +2609,7 @@ static int remove_directory(const char *dir) { ...@@ -2609,7 +2609,7 @@ static int remove_directory(const char *dir) {
static void handle_delete(struct connection *conn, const char *path) { static void handle_delete(struct connection *conn, const char *path) {
file_stat_t st; file_stat_t st;
if (!stat(path, &st)) { if (stat(path, &st) != 0) {
send_http_error(conn, 404, NULL); send_http_error(conn, 404, NULL);
} else if (S_ISDIR(st.st_mode)) { } else if (S_ISDIR(st.st_mode)) {
remove_directory(path); remove_directory(path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment