From: Pierre Joye Date: Mon, 1 Feb 2010 15:22:31 +0000 (+0000) Subject: - set errno on failure so that the caller can still rely on strerror (reporting wrong... X-Git-Tag: php-5.4.0alpha1~344 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f25710db92b8ade37ec6024ae1d432808e841359;p=php - set errno on failure so that the caller can still rely on strerror (reporting wrong error w/o this change) --- diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index 66949fabcc..972e71bbf3 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -1001,6 +1001,11 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func TSRMLS_FETCH(); if (path_length == 0 || path_length >= MAXPATHLEN-1) { +#ifdef TSRM_WIN32 + _set_errno(EINVAL); +#else + errno = EINVAL +#endif return 1; }