From 04a51b1f932f1689305715d7e8edc81b3d4791f0 Mon Sep 17 00:00:00 2001 From: Eric Defore Date: Wed, 6 Sep 2023 16:53:55 -0400 Subject: [PATCH] Prevent creating empty directories When files are synced from the build directory to the zip directory, if the include/exclude rules would have resulted in an empty directory, that empty directory would be created and included in the ZIP. By just skipping over any directories in the iterator, we prevent that from happening. If the directory needs to be created, it is being created just before the file is written anyway. --- src/Commands/Package.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Commands/Package.php b/src/Commands/Package.php index d6c6530..15daf42 100644 --- a/src/Commands/Package.php +++ b/src/Commands/Package.php @@ -415,7 +415,6 @@ protected function syncFiles( string $root, string $destination ): int { } if ( $item->isDir() ) { - $filesystem->mkdir( $destination . DIRECTORY_SEPARATOR . $path ); continue; }