]> granicus.if.org Git - php/commitdiff
- set errno on failure so that the caller can still rely on strerror (reporting wrong...
authorPierre Joye <pajoye@php.net>
Mon, 1 Feb 2010 15:22:31 +0000 (15:22 +0000)
committerPierre Joye <pajoye@php.net>
Mon, 1 Feb 2010 15:22:31 +0000 (15:22 +0000)
TSRM/tsrm_virtual_cwd.c

index 1c5ced39f5df6f1bac7b28167d839c708fcda346..5a64198cd7030ed7d88ee90cd660f50f4688a3df 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;
        }