]> granicus.if.org Git - php/commitdiff
- Fix V_CHDIR_FILE()
authorAndi Gutmans <andi@php.net>
Tue, 3 Oct 2000 15:08:37 +0000 (15:08 +0000)
committerAndi Gutmans <andi@php.net>
Tue, 3 Oct 2000 15:08:37 +0000 (15:08 +0000)
TSRM/tsrm_virtual_cwd.c

index facfdfce0414ca3510398f4752e8d942fe0454da..c8d41b2f6c5d1144f24d69df31c4d441ec80aa19 100644 (file)
@@ -422,7 +422,9 @@ CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path
        }
 
        if (length == -1) {
-               return virtual_chdir(path);
+               /* No directory only file name */
+               errno = ENOENT;
+               return -1;
        }
 
        if (length == COPY_WHEN_ABSOLUTE && IS_ABSOLUTE_PATH(path, length+1)) { /* Also use trailing slash if this is absolute */