changeset 3387:a02b6d2e3bfd

fix Win32 error message when an temporary file replaces an existent file: return at once if ngx_win32_rename_file() was not failed and do not try to delete already the renamed temporary file
author Igor Sysoev <igor@sysoev.ru>
date Thu, 17 Dec 2009 10:05:39 +0000
parents 044f81432d91
children d788521e4b0e
files src/core/ngx_file.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/ngx_file.c
+++ b/src/core/ngx_file.c
@@ -592,6 +592,10 @@ ngx_ext_rename_file(ngx_str_t *src, ngx_
 
     if (err == NGX_EEXIST) {
         err = ngx_win32_rename_file(src, to, ext->log);
+
+        if (err == 0) {
+            return NGX_OK;
+        }
     }
 
 #endif