From 2933875d65f62aa9f4cdfc11684fd498b165172e Mon Sep 17 00:00:00 2001 From: Daniel Neto Date: Fri, 23 Feb 2024 14:49:08 -0300 Subject: [PATCH] https://github.com/WWBN/AVideo-Encoder/issues/527#issuecomment-1961746983 --- objects/functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/objects/functions.php b/objects/functions.php index d1e21456..c4a60d9b 100644 --- a/objects/functions.php +++ b/objects/functions.php @@ -670,8 +670,10 @@ function zipDirectory($destinationFile) { new RecursiveDirectoryIterator($rootPath), RecursiveIteratorIterator::LEAVES_ONLY ); + $countFiles = 0; $countFilesAdded = 0; foreach ($files as $name => $file) { + $countFiles++; $filePath = $file->getRealPath(); // Ensure the file is readable if (!$file->isDir() && is_readable($filePath)) { @@ -692,7 +694,7 @@ function zipDirectory($destinationFile) { } } - error_log("zipDirectory($destinationFile) added {$countFilesAdded} files of a total=".count($files)); + error_log("zipDirectory($destinationFile) added {$countFilesAdded} files of a total={$countFiles}"); // Zip archive will be created only after closing object $zip->close();