@@ -206,7 +206,9 @@ protected function archiveTar($archiveFile, $items)
206
206
}
207
207
208
208
$ tar_object = new \Archive_Tar ($ archiveFile );
209
- $ tar_object ->setIgnoreList ($ this ->ignoreList );
209
+ if (!empty ($ this ->ignoreList )) {
210
+ $ tar_object ->setIgnoreList ($ this ->ignoreList );
211
+ }
210
212
foreach ($ items as $ placementLocation => $ filesystemLocation ) {
211
213
$ p_remove_dir = $ filesystemLocation ;
212
214
$ p_add_dir = $ placementLocation ;
@@ -259,9 +261,12 @@ protected function addItemsToZip($zip, $items)
259
261
foreach ($ items as $ placementLocation => $ filesystemLocation ) {
260
262
if (is_dir ($ filesystemLocation )) {
261
263
$ finder = new Finder ();
262
- // Add slashes so Symfony Finder patterns work like Archive_Tar ones.
263
- $ zipIgnoreList = preg_filter ('/^|$/ ' , '/ ' , $ this ->ignoreList );
264
- $ finder ->files ()->in ($ filesystemLocation )->ignoreDotFiles (false )->notName ($ zipIgnoreList )->notPath ($ zipIgnoreList );
264
+ $ finder ->files ()->in ($ filesystemLocation )->ignoreDotFiles (false );
265
+ if (!empty ($ this ->ignoreList )) {
266
+ // Add slashes so Symfony Finder patterns work like Archive_Tar ones.
267
+ $ zipIgnoreList = preg_filter ('/^|$/ ' , '/ ' , $ this ->ignoreList );
268
+ $ finder ->notName ($ zipIgnoreList )->notPath ($ zipIgnoreList );
269
+ }
265
270
266
271
foreach ($ finder as $ file ) {
267
272
// Replace Windows slashes or resulting zip will have issues on *nixes.
0 commit comments