Merge pull request #1194 from SamBrishes/patch-002
[BUGFIX] ZIP Paths may starts with an (back-) slash
This commit is contained in:
commit
4a740ecb03
|
@ -175,9 +175,9 @@ class Filesystem {
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
$file = realpath($file);
|
$file = realpath($file);
|
||||||
if (is_dir($file)) {
|
if (is_dir($file)) {
|
||||||
$zip->addEmptyDir(str_replace($source, '', $file));
|
$zip->addEmptyDir(ltrim(str_replace($source, '', $file), "/\\"));
|
||||||
} elseif (is_file($file)) {
|
} elseif (is_file($file)) {
|
||||||
$zip->addFromString(str_replace($source, '', $file), file_get_contents($file));
|
$zip->addFromString(ltrim(str_replace($source, '', $file), "/\\"), file_get_contents($file));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif (is_file($source)) {
|
} elseif (is_file($source)) {
|
||||||
|
|
Loading…
Reference in New Issue