comparison src/os/win32/ngx_errno.h @ 6469:7cdf612fd58c

Win32: replaced NGX_EXDEV with more appropriate error code. Correct error code for NGX_EXDEV on Windows is ERROR_NOT_SAME_DEVICE, "The system cannot move the file to a different disk drive". Previously used ERROR_WRONG_DISK is about wrong diskette in the drive and is not appropriate. There is no real difference though, as MoveFile() is able to copy files between disk drives, and will fail with ERROR_ACCESS_DENIED when asked to copy directories. The ERROR_NOT_SAME_DEVICE error is only used by MoveFileEx() when called without the MOVEFILE_COPY_ALLOWED flag.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 29 Mar 2016 09:52:15 +0300
parents a5897d360977
children 58afcd72446f
comparison
equal deleted inserted replaced
6468:a5897d360977 6469:7cdf612fd58c
31 * and ERROR_ALREADY_EXISTS used by CreateDirectory(); 31 * and ERROR_ALREADY_EXISTS used by CreateDirectory();
32 * MoveFile() uses both 32 * MoveFile() uses both
33 */ 33 */
34 #define NGX_EEXIST ERROR_ALREADY_EXISTS 34 #define NGX_EEXIST ERROR_ALREADY_EXISTS
35 #define NGX_EEXIST_FILE ERROR_FILE_EXISTS 35 #define NGX_EEXIST_FILE ERROR_FILE_EXISTS
36 /* 36 #define NGX_EXDEV ERROR_NOT_SAME_DEVICE
37 * could not found cross volume directory move error code,
38 * so use ERROR_WRONG_DISK as stub one
39 */
40 #define NGX_EXDEV ERROR_WRONG_DISK
41 #define NGX_ENOTDIR ERROR_PATH_NOT_FOUND 37 #define NGX_ENOTDIR ERROR_PATH_NOT_FOUND
42 #define NGX_EISDIR ERROR_CANNOT_MAKE 38 #define NGX_EISDIR ERROR_CANNOT_MAKE
43 #define NGX_ENOSPC ERROR_DISK_FULL 39 #define NGX_ENOSPC ERROR_DISK_FULL
44 #define NGX_EPIPE EPIPE 40 #define NGX_EPIPE EPIPE
45 #define NGX_EAGAIN WSAEWOULDBLOCK 41 #define NGX_EAGAIN WSAEWOULDBLOCK