Project

General

Profile

Actions

Bug #16798

closed

The function t3lib_div::isAbsPath() doesn't work correctly on Windows.

Added by Daniel Hoffmann almost 18 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2006-12-20
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)

Actions #1

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).

Actions #2

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/

Actions #3

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

Actions #4

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

Actions #5

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

Actions #6

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)
Actions #7

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

Actions #8

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

Actions #9

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.

Actions #10

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF