]> granicus.if.org Git - php/commitdiff
- - set errno on failure so that the caller can still rely on strerror
authorPierre Joye <pajoye@php.net>
Thu, 4 Feb 2010 09:55:13 +0000 (09:55 +0000)
committerPierre Joye <pajoye@php.net>
Thu, 4 Feb 2010 09:55:13 +0000 (09:55 +0000)
TSRM/tsrm_virtual_cwd.c

index dd3d123a186f016f9f9e662075ce8f2acc90f3ad..af53f25ac092fe35513e04a8e8b634a4c6397a1c 100644 (file)
@@ -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;
        }