Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Closes #5733, Avoid delegation overhead in Folder::correctSlashFor();

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7939 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
commit d5b86bc4bf03ad6dfaed866508158de993a25f76 1 parent 7f30d75
@phpnut phpnut authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 cake/libs/folder.php
View
10 cake/libs/folder.php
@@ -261,10 +261,7 @@ function isAbsolute($path) {
* @static
*/
function normalizePath($path) {
- if (Folder::isWindowsPath($path)) {
- return '\\';
- }
- return '/';
+ return Folder::correctSlashFor($path);
}
/**
* Returns a correct set of slashes for given $path. (\\ for Windows paths and / for other paths.)
@@ -275,7 +272,10 @@ function normalizePath($path) {
* @static
*/
function correctSlashFor($path) {
- return Folder::normalizePath($path);
+ if (Folder::isWindowsPath($path)) {
+ return '\\';
+ }
+ return '/';
}
/**
* Returns $path with added terminating slash (corrected for Windows or other OS).
Please sign in to comment.
Something went wrong with that request. Please try again.