Re: cvs: php-src /main/streams streams.c

From: Date: Sun, 23 Nov 2003 22:29:49 +0000
Subject: Re: cvs: php-src /main/streams streams.c
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-24636@lists.php.net to get a copy of this message
> That win32 branch of the code looks suspect > (I know it is not part of the commit). > Anyone have time to check it out? > Looks to me like it's dealing with the case where file:///C:/foo.ext is supplied. *path_for_open = (char*)path + n + 1; This'll put us at the first ':' while (*(++*path_for_open)=='/'); This'll get us to the 'C' drive letter. #ifdef PHP_WIN32 if (*(*path_for_open + 1) != ':') #endif (*path_for_open)--; And this last says: If the next character is a colon, we're dealing with a win file path, so we want to pass off "C:/foo.txt". If it's not a colon, we've got a more traditional path (i.e.: '/foo.txt') so we want to back up one to include the original '/' What's wonky is that I don't see how you're supposed to specify a relative file path when specifying the file wrapper. ftp://relativepath/foo.txt gets caught as trying to access a remote file (even on unix). PHP4 seems to turn that into: file:/relativepath/foo.txt: open("/local/cvs/php5/file:/relative/foo.txt", O_RDONLY) = -1 ENOENT (No such file or directory) file://./foo.txt is no better on either version. -Sara

« previous php.cvs (#24636) next »