summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-04-01 15:59:49 +0200
committerDerek Jones <derek.jones@ellislab.com>2008-04-01 15:59:49 +0200
commitac7c81e3cd8891d7a8103c121911f7192b5027af (patch)
tree47e7f75f84b31398bf752806e0ec2ed7bef47b1b
parent9b9a18e8cf4f4dd4eee7ba17715dd95e218772f9 (diff)
Modified get_filenames() to use DIRECTORY_SEPARATOR constant instead of '/' for better cross-platform compatibility
-rw-r--r--system/helpers/file_helper.php4
-rw-r--r--user_guide/changelog.html2
2 files changed, 3 insertions, 3 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) != ".")
{
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index b6632305f..870e21c1d 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -93,7 +93,7 @@ Change Log
<li>Fixed an AR_caching error where it wasn't tracking table aliases (#3463).</li>
<li>Fixed a bug in the DB class testing the $params argument.</li>
<li>Fixed a bug in the Table library where the integer 0 in cell data would be displayed as a blank cell.</li>
- <li>Fixed bugs (#3523, #4350) in get_filenames() with recursion.</p>
+ <li>Fixed bugs (#3523, #4350) in get_filenames() with recursion and problems with Windows when $include_path is used.</p>
</ul>
<h2>Version 1.6.1</h2>