Mercurial > hg > nginx-quic
comparison src/core/ngx_file.c @ 3382:6be1f25bae90
fix Win32 error messages when an temporary file replaces an existent file:
*) do not rename an already renamed file
*) now ngx_win32_rename_file() returns error code
*) do not log failure inside ngx_win32_rename_file()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 15 Dec 2009 13:47:02 +0000 |
parents | 121fae8c673c |
children | a02b6d2e3bfd |
comparison
equal
deleted
inserted
replaced
3381:49f977515733 | 3382:6be1f25bae90 |
---|---|
589 } | 589 } |
590 | 590 |
591 #if (NGX_WIN32) | 591 #if (NGX_WIN32) |
592 | 592 |
593 if (err == NGX_EEXIST) { | 593 if (err == NGX_EEXIST) { |
594 if (ngx_win32_rename_file(src, to, ext->log) == NGX_OK) { | 594 err = ngx_win32_rename_file(src, to, ext->log); |
595 | |
596 if (ngx_rename_file(src->data, to->data) != NGX_FILE_ERROR) { | |
597 return NGX_OK; | |
598 } | |
599 | |
600 err = ngx_errno; | |
601 | |
602 } else { | |
603 err = 0; | |
604 } | |
605 } | 595 } |
606 | 596 |
607 #endif | 597 #endif |
608 | 598 |
609 if (err == NGX_EXDEV) { | 599 if (err == NGX_EXDEV) { |