mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-23 14:58:40 +00:00
fix packing path for dir
This commit is contained in:
parent
cdd21c7a23
commit
988468bc82
|
|
@ -70,7 +70,7 @@ class Tar implements ArchiveInterface
|
|||
|
||||
$absolute = \realpath($file);
|
||||
$absolute = \str_replace('\\', '/', (string) $absolute);
|
||||
$dir = \str_replace($source . '/', '', \rtrim($relative, '/\\') . '/' . \ltrim($absolute, '/\\'));
|
||||
$dir = \rtrim($relative, '/\\') . '/' . \ltrim(\str_replace($source . '/', '', $absolute), '/\\');
|
||||
|
||||
if (\is_dir($absolute)) {
|
||||
$tar->addEmptyDir($dir . '/');
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ class Zip implements ArchiveInterface
|
|||
|
||||
$absolute = \realpath($file);
|
||||
$absolute = \str_replace('\\', '/', (string) $absolute);
|
||||
$dir = \str_replace($source . '/', '', \rtrim($relative, '/\\') . '/' . \ltrim($absolute, '/\\'));
|
||||
$dir = \rtrim($relative, '/\\') . '/' . \ltrim(\str_replace($source . '/', '', $absolute), '/\\');
|
||||
|
||||
if (\is_dir($absolute)) {
|
||||
$zip->addEmptyDir($dir . '/');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user