Created
January 16, 2018 13:07
-
-
Save glye/35be88b346a03251198745285a4873f3 to your computer and use it in GitHub Desktop.
eZ package trim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: ezpublish_legacy/kernel/classes/ezpackage.php | |
=================================================================== | |
--- ezpublish_legacy/kernel/classes/ezpackage.php (revision 70715) | |
+++ ezpublish_legacy/kernel/classes/ezpackage.php (working copy) | |
@@ -1137,7 +1137,7 @@ | |
// Search for the files we want to extract | |
foreach( $archive as $entry ) | |
{ | |
- if ( in_array( $entry->getPath(), $fileList ) ) | |
+ if ( in_array( trim($entry->getPath(),DIRECTORY_SEPARATOR), $fileList ) ) | |
{ | |
if ( !$archive->extractCurrent( $archivePath ) ) | |
{ | |
Index: vendor/zetacomponents/archive/src/entry.php | |
=================================================================== | |
--- vendor/zetacomponents/archive/src/entry.php (revision 70715) | |
+++ vendor/zetacomponents/archive/src/entry.php (working copy) | |
@@ -212,11 +212,11 @@ | |
{ | |
if ( $withPrefix ) | |
{ | |
- return $this->fileStructure->path; | |
+ return trim($this->fileStructure->path); | |
} | |
else | |
{ | |
- return $this->getPathWithoutPrefix( $this->fileStructure->path, $this->prefix ); | |
+ return $this->getPathWithoutPrefix( trim($this->fileStructure->path), $this->prefix ); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment