diff options
author | Derek Jones <derek.jones@ellislab.com> | 2008-04-01 15:59:49 +0200 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2008-04-01 15:59:49 +0200 |
commit | ac7c81e3cd8891d7a8103c121911f7192b5027af (patch) | |
tree | 47e7f75f84b31398bf752806e0ec2ed7bef47b1b /system/helpers | |
parent | 9b9a18e8cf4f4dd4eee7ba17715dd95e218772f9 (diff) |
Modified get_filenames() to use DIRECTORY_SEPARATOR constant instead of '/' for better cross-platform compatibility
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/file_helper.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index e1a4ff31a..04c5747bf 100644 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -175,14 +175,14 @@ if (! function_exists('get_filenames')) if ($_recursion === FALSE)
{
$_filedata = array();
- $source_dir = realpath($source_dir).'/';
+ $source_dir = rtrim(realpath($source_dir), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
}
while (FALSE !== ($file = readdir($fp)))
{
if (@is_dir($source_dir.$file) && substr($file, 0, 1) != '.')
{
- get_filenames($source_dir.$file."/", $include_path, TRUE);
+ get_filenames($source_dir.$file.DIRECTORY_SEPARATOR, $include_path, TRUE);
}
elseif (substr($file, 0, 1) != ".")
{
|