iliaa           Tue Sep  9 20:22:11 2003 EDT

  Modified files:              
    /php-src/ext/standard       file.c 
  Log:
  Fixed bug #14049 (realpath() w/ZTS returns invalid results for non-existent
  paths)
  
  
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.356 php-src/ext/standard/file.c:1.357
--- php-src/ext/standard/file.c:1.356   Thu Aug 28 12:49:57 2003
+++ php-src/ext/standard/file.c Tue Sep  9 20:22:10 2003
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: file.c,v 1.356 2003/08/28 16:49:57 sas Exp $ */
+/* $Id: file.c,v 1.357 2003/09/10 00:22:10 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -43,6 +43,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #ifdef PHP_WIN32
+#include <io.h>
 #define O_RDONLY _O_RDONLY
 #include "win32/param.h"
 #include "win32/winutil.h"
@@ -1939,6 +1940,15 @@
        convert_to_string_ex(path);
 
        if (VCWD_REALPATH(Z_STRVAL_PP(path), resolved_path_buff)) {
+#if ZTS
+# if PHP_WIN32
+               if (_access(resolved_path_buff, 0))
+                       RETURN_FALSE;
+# else
+               if (access(resolved_path_buff, F_OK))
+                       RETURN_FALSE;
+# endif
+#endif
                RETURN_STRING(resolved_path_buff, 1);
        } else {
                RETURN_FALSE;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to