]> 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 66949fabcc28aa732d425c56b9a8a30158e3bad7..972e71bbf3b038906ae2843f1bde54f9e95891b6 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;
        }