From c6a04e17195b3983ed4b700ddc4362af8962a26c Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Mon, 18 May 2015 11:50:56 +0100 Subject: [PATCH] Fix #523 --- mongoose.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mongoose.c b/mongoose.c index d7e5246d..2f8305b1 100644 --- a/mongoose.c +++ b/mongoose.c @@ -3321,7 +3321,8 @@ static int find_index_file(struct connection *conn, char *path, // If no index file exists, restore directory path if (!found) { - path[n] = '\0'; + path[n] = '/'; + path[n + 1] = '\0'; } return found;