ソースを参照

Fix: mg_upload file created with \ character (issue #51)

bel 10 年 前
コミット
a65d96375a
1 ファイル変更2 行追加0 行削除
  1. 2 0
      src/civetweb.c

+ 2 - 0
src/civetweb.c

@@ -5553,6 +5553,8 @@ int mg_upload(struct mg_connection *conn, const char *destination_dir)
         if ((s = strrchr(fname, '/')) == NULL &&
             (s = strrchr(fname, '\\')) == NULL) {
             s = fname;
+        } else {
+            s++;
         }
 
         /* Open file in binary mode. TODO: set an exclusive lock. */