]> git.kaiwu.me - nginx.git/commitdiff
Win32 returns ERROR_PATH_NOT_FOUND instead of ERROR_FILE_NOT_FOUND
authorIgor Sysoev <igor@sysoev.ru>
Thu, 28 May 2009 15:32:22 +0000 (15:32 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 28 May 2009 15:32:22 +0000 (15:32 +0000)
src/core/ngx_file.c

index 450da5623f3780b1cc5751092a5041932912894f..3f47fc98b45bf38cdefc280d2e43f2996056149f 100644 (file)
@@ -558,8 +558,14 @@ ngx_ext_rename_file(ngx_str_t *src, ngx_str_t *to, ngx_ext_rename_file_t *ext)
 
     err = ngx_errno;
 
-    if (err == NGX_ENOENT) {
-
+    if (err
+#if (NGX_WIN32)
+            == ERROR_PATH_NOT_FOUND
+#else
+            == NGX_ENOENT
+#endif
+       )
+    {
         if (!ext->create_path) {
             goto failed;
         }