diff options
author | robocoder <anthon.pang@gmail.com> | 2010-12-05 18:00:42 +0300 |
---|---|---|
committer | robocoder <anthon.pang@gmail.com> | 2010-12-05 18:00:42 +0300 |
commit | 50ef774a3a50e242666e3c6eca0b1c0e3a1c773d (patch) | |
tree | 62e56a533fd672e1c3c092aa6ba000d11f9937e7 /core/Unzip | |
parent | 9ac631c19cb103264eb695edd596f83df18f1aae (diff) |
fixes #1868
git-svn-id: http://dev.piwik.org/svn/trunk@3408 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/Unzip')
-rw-r--r-- | core/Unzip/PclZip.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/Unzip/PclZip.php b/core/Unzip/PclZip.php index ef77484be4..c2226c0529 100644 --- a/core/Unzip/PclZip.php +++ b/core/Unzip/PclZip.php @@ -27,6 +27,7 @@ class Piwik_Unzip_PclZip implements Piwik_iUnzip } public function extract($pathExtracted) { + $pathExtracted = str_replace('\\', '/', $pathExtracted); $list = $this->pclzip->listContent(); foreach($list as $entry) { $filename = str_replace('\\', '/', $entry['stored_filename']); @@ -40,14 +41,15 @@ class Piwik_Unzip_PclZip implements Piwik_iUnzip } } + // PCLZIP_CB_PRE_EXTRACT callback returns 0 to skip, 1 to resume, or 2 to abort return $this->pclzip->extract( PCLZIP_OPT_PATH, $pathExtracted, PCLZIP_OPT_STOP_ON_ERROR, PCLZIP_CB_PRE_EXTRACT, create_function( '$p_event, &$p_header', - // callback should return 0 to skip, 1 to resume, 2 to abort "return strncmp(\$p_header['filename'], '$pathExtracted', strlen('$pathExtracted')) ? 0 : 1;" - )); + ) + ); } public function errorInfo() { |