diff options
author | Taufan Aditya <toopay@taufanaditya.com> | 2012-04-04 21:47:11 +0200 |
---|---|---|
committer | Taufan Aditya <toopay@taufanaditya.com> | 2012-04-04 21:47:11 +0200 |
commit | 8b0aca770ad6089e759c22a6b69b97ba2623a195 (patch) | |
tree | 0a7ad9aaa2c0fe0ea6ee49347c76c6c13032ac12 /system/libraries/Zip.php | |
parent | fd24fa614885d6c89e19aecb09ae97f95dd3db57 (diff) | |
parent | 13e749db5c3cbf2f951347829265c51f8f8ecc34 (diff) |
Merge remote-tracking branch 'upstream/develop' into db-tests
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); |