1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

fixing one severe bug showing since 5.2.4

git-svn-id: file:///svn/phpbb/trunk@8201 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-10-17 15:47:18 +00:00
parent d095649a65
commit 7b1a8511ce
2 changed files with 23 additions and 7 deletions

View File

@@ -683,6 +683,12 @@ if (!function_exists('realpath'))
// Put the slashes back to the native operating systems slashes
$resolved = str_replace('/', DIRECTORY_SEPARATOR, $resolved);
// Check for DIRECTORY_SEPARATOR at the end (and remove it!)
if (substr($resolved, -1) == DIRECTORY_SEPARATOR)
{
return substr($resolved, 0, -1);
}
return $resolved; // We got here, in the end!
}
}
@@ -694,7 +700,15 @@ else
*/
function phpbb_realpath($path)
{
return realpath($path);
$path = realpath($path);
// Check for DIRECTORY_SEPARATOR at the end (and remove it!)
if (substr($path, -1) == DIRECTORY_SEPARATOR)
{
return substr($path, 0, -1);
}
return $path;
}
}