diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-04-06 20:10:40 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-04-06 20:10:40 +0200 |
commit | fcdfcf9d8808c89e137ecce14b40936cffd99e83 (patch) | |
tree | 6887654802b9e228486720b69b74bb362e60033e /system/libraries/Zip.php | |
parent | fd105ab7f05e64c0d9188e43c6fd6a2bb2c6cf7f (diff) | |
parent | ea09a8a5552f2aacdeab0c88a605fe44047ebd0a (diff) |
Merge upstream branch
Diffstat (limited to 'system/libraries/Zip.php')
-rw-r--r-- | system/libraries/Zip.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index e91e2a2ff..80438546b 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -279,7 +279,7 @@ class CI_Zip { */ public function read_dir($path, $preserve_filepath = TRUE, $root_path = NULL) { - $path = rtrim($path, '/\\').'/'; + $path = rtrim($path, '/\\').DIRECTORY_SEPARATOR; if ( ! $fp = @opendir($path)) { return FALSE; @@ -288,7 +288,7 @@ class CI_Zip { // Set the original directory root for child dir's to use as relative if ($root_path === NULL) { - $root_path = dirname($path).'/'; + $root_path = dirname($path).DIRECTORY_SEPARATOR; } while (FALSE !== ($file = readdir($fp))) @@ -300,11 +300,11 @@ class CI_Zip { if (@is_dir($path.$file)) { - $this->read_dir($path.$file.'/', $preserve_filepath, $root_path); + $this->read_dir($path.$file.DIRECTORY_SEPARATOR, $preserve_filepath, $root_path); } elseif (FALSE !== ($data = file_get_contents($path.$file))) { - $name = str_replace('\\', '/', $path); + $name = str_replace(array('\\', '/'), DIRECTORY_SEPARATOR, $path); if ($preserve_filepath === FALSE) { $name = str_replace($root_path, '', $name); |