Mercurial > hg > nginx
changeset 3023:7d5501988fe3
NGX_ENOPATH
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 11 Aug 2009 14:25:04 +0000 |
parents | 56407044c593 |
children | 8101d9101ed8 |
files | src/core/ngx_file.c src/os/unix/ngx_errno.h src/os/win32/ngx_errno.h |
diffstat | 3 files changed, 5 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/ngx_file.c Tue Aug 11 08:14:43 2009 +0000 +++ b/src/core/ngx_file.c Tue Aug 11 14:25:04 2009 +0000 @@ -99,13 +99,7 @@ continue; } - if ((path->level[0] == 0) - || (err != NGX_ENOENT -#if (NGX_WIN32) - && err != NGX_ENOTDIR -#endif - )) - { + if ((path->level[0] == 0) || (err != NGX_ENOPATH)) { ngx_log_error(NGX_LOG_CRIT, file->log, err, ngx_open_tempfile_n " \"%s\" failed", file->name.data); @@ -560,14 +554,8 @@ err = ngx_errno; - if (err -#if (NGX_WIN32) - == ERROR_PATH_NOT_FOUND -#else - == NGX_ENOENT -#endif - ) - { + if (err == NGX_ENOPATH) { + if (!ext->create_path) { goto failed; }
--- a/src/os/unix/ngx_errno.h Tue Aug 11 08:14:43 2009 +0000 +++ b/src/os/unix/ngx_errno.h Tue Aug 11 14:25:04 2009 +0000 @@ -16,6 +16,7 @@ #define NGX_EPERM EPERM #define NGX_ENOENT ENOENT +#define NGX_ENOPATH ENOENT #define NGX_ESRCH ESRCH #define NGX_EINTR EINTR #define NGX_ECHILD ECHILD
--- a/src/os/win32/ngx_errno.h Tue Aug 11 08:14:43 2009 +0000 +++ b/src/os/win32/ngx_errno.h Tue Aug 11 14:25:04 2009 +0000 @@ -21,6 +21,7 @@ #define NGX_EPERM ERROR_ACCESS_DENIED #define NGX_ENOENT ERROR_FILE_NOT_FOUND +#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 */