]> git.kaiwu.me - nginx.git/commitdiff
do not create Win32 drive letter in ngx_create_full_path()
authorIgor Sysoev <igor@sysoev.ru>
Wed, 14 Oct 2009 11:36:16 +0000 (11:36 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 14 Oct 2009 11:36:16 +0000 (11:36 +0000)
src/core/ngx_file.c

index 45bb4ca4fddf8aa64e85a3bcff528314923d0ddd..b93a209677e157734de73a2fb34c4e17939bc841 100644 (file)
@@ -183,7 +183,13 @@ ngx_create_full_path(u_char *dir, ngx_uint_t access)
     u_char     *p, ch;
     ngx_err_t   err;
 
-    for (p = dir + 1; *p; p++) {
+#if (NGX_WIN32)
+    p = dir + 3;
+#else
+    p = dir + 1;
+#endif
+
+    for ( /* void */ ; *p; p++) {
         ch = *p;
 
         if (ch != '/') {