From 66913a8b75e51705d9830e7eb4a55b7d421c3838 Mon Sep 17 00:00:00 2001 From: Michal Borychowski <807297+boryn@users.noreply.github.com> Date: Thu, 12 Oct 2023 18:52:58 +0200 Subject: [PATCH] fix for zip compression when $nameInZip is not specified --- src/Tasks/Backup/Zip.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tasks/Backup/Zip.php b/src/Tasks/Backup/Zip.php index c4f1b0a8..a6aac159 100644 --- a/src/Tasks/Backup/Zip.php +++ b/src/Tasks/Backup/Zip.php @@ -110,7 +110,7 @@ public function add(string | iterable $files, string $nameInZip = null): self if (is_int($compressionMethod)) { $this->zipFile->setCompressionName( - ltrim($nameInZip, DIRECTORY_SEPARATOR), + ltrim($nameInZip ?: $file, DIRECTORY_SEPARATOR), $compressionMethod, $compressionLevel );