php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11470 PATCH: UNC paths do not work with stat()
Submitted: 2001-06-13 15:28 UTC Modified: 2001-06-27 12:39 UTC
From: jeremy at deadbeef dot com Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0 Latest CVS (2001-06-13) OS: Windows NT 4.0 Build 1381
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jeremy at deadbeef dot com
New email:
PHP Version: OS:

 

 [2001-06-13 15:28 UTC] jeremy at deadbeef dot com
Calling stat() on a UNC path will always fail.  ex. stat("\\\\computername\\share\\file"); will get a file not found error.

I fixed the bug, here is the patch:

cvs server: Diffing TSRM
Index: TSRM/tsrm_virtual_cwd.c
===================================================================
RCS file: /repository/TSRM/tsrm_virtual_cwd.c,v
retrieving revision 1.19
diff -u -r1.19 tsrm_virtual_cwd.c
--- TSRM/tsrm_virtual_cwd.c     2001/05/05 16:05:19     1.19
+++ TSRM/tsrm_virtual_cwd.c     2001/06/13 19:28:51
@@ -315,7 +315,7 @@
                is_absolute = 1;
 #ifdef TSRM_WIN32
        } else if (IS_UNC_PATH(path_copy, path_length)) {
-               copy_amount = 1;
+               copy_amount = COPY_WHEN_ABSOLUTE;
                is_absolute = 1;
        } else if (IS_SLASH(path_copy[0])) {
                copy_amount = 2;

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-27 12:39 UTC] sniper@php.net
This should be fixed in latest CVS.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC