]> granicus.if.org Git - php/commitdiff
MFH: fix #39060 (virtual_file_ex() is broken on *BSD)
authorAntony Dovgal <tony2001@php.net>
Fri, 6 Oct 2006 14:03:19 +0000 (14:03 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 6 Oct 2006 14:03:19 +0000 (14:03 +0000)
TSRM/tsrm_virtual_cwd.c

index 54ae9a75ffc2ba74bb5b05e4bc27758e0503f4f6..eafa003aecddf96406609c5daf19a1ac58a8a6d0 100644 (file)
@@ -385,7 +385,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
        /* cwd_length can be 0 when getcwd() fails.
         * This can happen under solaris when a dir does not have read permissions
         * but *does* have execute permissions */
-       if (!IS_ABSOLUTE_PATH(path, path_length) && (state->cwd_length > 1)) {
+       if (!IS_ABSOLUTE_PATH(path, path_length) && (state->cwd_length > 0)) {
                int orig_path_len;
                int state_cwd_length = state->cwd_length;