mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-13 15:18:41 +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 = \realpath($file);
|
||||||
$absolute = \str_replace('\\', '/', (string) $absolute);
|
$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)) {
|
if (\is_dir($absolute)) {
|
||||||
$tar->addEmptyDir($dir . '/');
|
$tar->addEmptyDir($dir . '/');
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ class Zip implements ArchiveInterface
|
||||||
|
|
||||||
$absolute = \realpath($file);
|
$absolute = \realpath($file);
|
||||||
$absolute = \str_replace('\\', '/', (string) $absolute);
|
$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)) {
|
if (\is_dir($absolute)) {
|
||||||
$zip->addEmptyDir($dir . '/');
|
$zip->addEmptyDir($dir . '/');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user