diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2016-03-29 09:51:46 +0300 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2016-03-29 09:51:46 +0300 |
commit | 6871615528044ff3dce2bf2abdf862d1178a2c9e (patch) | |
tree | ddc22c3ff087e2ad0b717c16575c243abd609397 /src/os/win32/ngx_errno.h | |
parent | 4618c03f4c130d30128a1cea135e2c9e636a13ba (diff) | |
download | nginx-6871615528044ff3dce2bf2abdf862d1178a2c9e.tar.gz nginx-6871615528044ff3dce2bf2abdf862d1178a2c9e.zip |
Win32: additional error code NGX_EEXIST_FILE (ticket #910).
On Windows there are two possible error codes which correspond to
the EEXIST error code: ERROR_FILE_EXISTS used by CreateFile(CREATE_NEW),
and ERROR_ALREADY_EXISTS used by CreateDirectory().
MoveFile() seems to use both: ERROR_ALREADY_EXISTS when moving within
one filesystem, and ERROR_FILE_EXISTS when copying a file to a different
drive.
Diffstat (limited to 'src/os/win32/ngx_errno.h')
-rw-r--r-- | src/os/win32/ngx_errno.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/os/win32/ngx_errno.h b/src/os/win32/ngx_errno.h index fd3214563..02245e440 100644 --- a/src/os/win32/ngx_errno.h +++ b/src/os/win32/ngx_errno.h @@ -25,8 +25,14 @@ typedef DWORD ngx_err_t; #define NGX_ENOPATH ERROR_PATH_NOT_FOUND #define NGX_ENOMEM ERROR_NOT_ENOUGH_MEMORY #define NGX_EACCES ERROR_ACCESS_DENIED -/* it's seems that ERROR_FILE_EXISTS is not appropriate error code */ +/* + * there are two EEXIST error codes: + * ERROR_FILE_EXISTS used by CreateFile(CREATE_NEW), + * and ERROR_ALREADY_EXISTS used by CreateDirectory(); + * MoveFile() uses both + */ #define NGX_EEXIST ERROR_ALREADY_EXISTS +#define NGX_EEXIST_FILE ERROR_FILE_EXISTS /* * could not found cross volume directory move error code, * so use ERROR_WRONG_DISK as stub one |