]> git.kaiwu.me - nginx.git/commit
Win32: reworked ngx_win32_rename_file() to check errors.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 23 Feb 2023 17:49:50 +0000 (20:49 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 23 Feb 2023 17:49:50 +0000 (20:49 +0300)
commit94d8cea620e0abc67f4d0fe9aaf6170f39529c8c
tree730ef1923d84ad8f7e4d73e8b69551b84bcc4873
parentf8075f1ef5106c9f0d894f83cfa81dbb9f5ce2da
Win32: reworked ngx_win32_rename_file() to check errors.

Previously, ngx_win32_rename_file() retried on all errors returned by
MoveFile() to a temporary name.  It only make sense, however, to retry
when the destination file already exists, similarly to the condition
when ngx_win32_rename_file() is called.  Retrying on other errors is
meaningless and might result in an infinite loop.
src/os/win32/ngx_files.c