diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-04-06 20:29:24 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-04-06 20:29:24 +0200 |
commit | 00aed0d9015040764fb7fe8edb7452459fc19213 (patch) | |
tree | 371dba8df01bb1d527c85cfb810a9bfa9c86bd53 /system/libraries/Zip.php | |
parent | 2cb262ff0ee22f3928e39f19dc0112b9eb26cabc (diff) | |
parent | ea09a8a5552f2aacdeab0c88a605fe44047ebd0a (diff) |
Merge upstram 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); |