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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

History

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

 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Dec 06 10:03:51 2022 UTC