cvs: TSRM / tsrm_virtual_cwd.c

From: Date: Thu, 04 Dec 2003 17:02:09 +0000
Subject: cvs: TSRM / tsrm_virtual_cwd.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-2071@lists.php.net to get a copy of this message
wez Thu Dec 4 12:02:09 2003 EDT Modified files: /TSRM tsrm_virtual_cwd.c Log: Fix Andi's GetLongPathName code so that virtual_file_ex doesn't fail if the file does not exist. Index: TSRM/tsrm_virtual_cwd.c diff -u TSRM/tsrm_virtual_cwd.c:1.55 TSRM/tsrm_virtual_cwd.c:1.56 --- TSRM/tsrm_virtual_cwd.c:1.55 Tue Dec 2 16:12:17 2003 +++ TSRM/tsrm_virtual_cwd.c Thu Dec 4 12:02:09 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_virtual_cwd.c,v 1.55 2003/12/02 21:12:17 andi Exp $ */ +/* $Id: tsrm_virtual_cwd.c,v 1.56 2003/12/04 17:02:09 wez Exp $ */ #include <sys/types.h> #include <sys/stat.h> @@ -347,12 +347,15 @@ return 1; } - if (GetLongPathName(path, new_path, new_path_length) == 0) { + if (GetLongPathName(path, new_path, new_path_length) != 0) { + path = new_path; + path_length = new_path_length; + } else { free(new_path); - return 1; + if (GetLastError() != ERROR_FILE_NOT_FOUND) { + return 1; + } } - path = new_path; - path_length = new_path_length; } #endif free_path = path_copy = tsrm_strndup(path, path_length);

« previous php.zend-engine.cvs (#2071) next »