From 3fa5c69f9858b8561799ff211519d2ce26e0bc8e Mon Sep 17 00:00:00 2001 From: Sergey Lyubka <valenok@gmail.com> Date: Mon, 27 Jan 2014 11:06:05 +0000 Subject: [PATCH] Fixed handle_delete() stat call --- mongoose.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mongoose.c b/mongoose.c index 2fb165dab..b245017c2 100644 --- a/mongoose.c +++ b/mongoose.c @@ -2609,7 +2609,7 @@ static int remove_directory(const char *dir) { static void handle_delete(struct connection *conn, const char *path) { file_stat_t st; - if (!stat(path, &st)) { + if (stat(path, &st) != 0) { send_http_error(conn, 404, NULL); } else if (S_ISDIR(st.st_mode)) { remove_directory(path); -- GitLab