Bug #16798
closedThe function t3lib_div::isAbsPath() doesn't work correctly on Windows.
100%
Description
Running Typo3 on Windows, the function just checks if there is a ':/' from position 1 to 2 in the path. On Unix, it checks for a starting '/', and that should be done on Windows, too. So, just replace the line
return TYPO3_OS=='WIN' ? substr($path,1,2)==':/' : substr($path,0,1)=='/';
with this one
return TYPO3_OS=='WIN' ? (substr($path,1,2)==':/' || substr($path,0,1)=='/') : substr($path,0,1)=='/';
in the function isAbsPath() (about line 3358)
This will check for both ':/' and '/' if running on Windows.
(issue imported from #M4676)
Updated by Chris topher over 14 years ago
Valid paths on Windows are something like
C:\Folder\Filename.abc
\\servername\Folder\Filename.abc
\Folder\Filename.abc
See http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx#fully_qualified_vs._relative_paths
The function currently does not check for the second and third variant (Universal Naming Convention, UNC).
Updated by Chris topher over 14 years ago
Daniel, can you put your changes to a patch file and post it to Core List?
See here: http://typo3.org/development/bug-fixing/mailing-list/
Updated by Mr. Hudson over 13 years ago
Patch set 1 of change Ie34449b8fc9f5e5a203044457baa64283412cf66 has been pushed to the review server.
It is available at http://review.typo3.org/3712
Updated by Mr. Hudson over 13 years ago
Patch set 2 of change Ie34449b8fc9f5e5a203044457baa64283412cf66 has been pushed to the review server.
It is available at http://review.typo3.org/3712
Updated by Mr. Hudson over 13 years ago
Patch set 3 of change Ie34449b8fc9f5e5a203044457baa64283412cf66 has been pushed to the review server.
It is available at http://review.typo3.org/3712
Updated by Susanne Moog over 13 years ago
- Category deleted (
Communication) - Status changed from Needs Feedback to Under Review
- Target version deleted (
0) - PHP Version deleted (
4)
Updated by Mr. Hudson over 13 years ago
Patch set 4 of change Ie34449b8fc9f5e5a203044457baa64283412cf66 has been pushed to the review server.
It is available at http://review.typo3.org/3712
Updated by Mr. Hudson over 13 years ago
Patch set 1 of change Ie16b9f15d384b0da07e19eea68c37bbaee5094f5 has been pushed to the review server.
It is available at http://review.typo3.org/4465
Updated by Xavier Perseguers over 13 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
master: Change has been successfully cherry-picked as b7e0ee0614a47ffbed4b00375d32846ec0d5c1b0.
TYPO3_4-5: Change has been successfully cherry-picked as 26634386e1f76db86578d02442cab2f4e5fe174e.