Skip to content

Commit

Permalink
https://github.com/WWBN/AVideo-Encoder/issues/527#issuecomment-196174…
Browse files Browse the repository at this point in the history
…6983
  • Loading branch information
Daniel Neto committed Feb 23, 2024
1 parent 613a12c commit 2933875
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion objects/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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();
Expand Down

0 comments on commit 2933875

Please sign in to comment.