From: Andi Gutmans Date: Tue, 3 Oct 2000 15:08:37 +0000 (+0000) Subject: - Fix V_CHDIR_FILE() X-Git-Tag: php-4.0.3RC2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3dab84005d8b70190e35776e6609585ee4d285c3;p=php - Fix V_CHDIR_FILE() --- diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index facfdfce04..c8d41b2f6c 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -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 */