Fixed handle_delete() stat call

This commit is contained in:
Sergey Lyubka 2014-01-27 11:06:05 +00:00
parent e31f3058fa
commit 3fa5c69f98

View File

@ -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);