Mercurial > hg > nginx
comparison src/os/win32/ngx_errno.h @ 6468:a5897d360977
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 29 Mar 2016 09:51:46 +0300 |
parents | 3c5ddf0575d8 |
children | 7cdf612fd58c |
comparison
equal
deleted
inserted
replaced
6467:91c8d990fb45 | 6468:a5897d360977 |
---|---|
23 #define NGX_EPERM ERROR_ACCESS_DENIED | 23 #define NGX_EPERM ERROR_ACCESS_DENIED |
24 #define NGX_ENOENT ERROR_FILE_NOT_FOUND | 24 #define NGX_ENOENT ERROR_FILE_NOT_FOUND |
25 #define NGX_ENOPATH ERROR_PATH_NOT_FOUND | 25 #define NGX_ENOPATH ERROR_PATH_NOT_FOUND |
26 #define NGX_ENOMEM ERROR_NOT_ENOUGH_MEMORY | 26 #define NGX_ENOMEM ERROR_NOT_ENOUGH_MEMORY |
27 #define NGX_EACCES ERROR_ACCESS_DENIED | 27 #define NGX_EACCES ERROR_ACCESS_DENIED |
28 /* it's seems that ERROR_FILE_EXISTS is not appropriate error code */ | 28 /* |
29 * there are two EEXIST error codes: | |
30 * ERROR_FILE_EXISTS used by CreateFile(CREATE_NEW), | |
31 * and ERROR_ALREADY_EXISTS used by CreateDirectory(); | |
32 * MoveFile() uses both | |
33 */ | |
29 #define NGX_EEXIST ERROR_ALREADY_EXISTS | 34 #define NGX_EEXIST ERROR_ALREADY_EXISTS |
35 #define NGX_EEXIST_FILE ERROR_FILE_EXISTS | |
30 /* | 36 /* |
31 * could not found cross volume directory move error code, | 37 * could not found cross volume directory move error code, |
32 * so use ERROR_WRONG_DISK as stub one | 38 * so use ERROR_WRONG_DISK as stub one |
33 */ | 39 */ |
34 #define NGX_EXDEV ERROR_WRONG_DISK | 40 #define NGX_EXDEV ERROR_WRONG_DISK |