From 6d8c22203584a2d9806aee3944dd526f33cb4036 Mon Sep 17 00:00:00 2001 From: ewallah Date: Fri, 3 May 2024 11:25:16 +0200 Subject: [PATCH] Issue #297 Grunt job is not ignoring hidden directories #297 --- src/Command/GruntCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Command/GruntCommand.php b/src/Command/GruntCommand.php index f2415aef..7634367e 100644 --- a/src/Command/GruntCommand.php +++ b/src/Command/GruntCommand.php @@ -112,7 +112,9 @@ public function backupPlugin(): void */ public function restorePlugin(): void { - (new Filesystem())->mirror($this->backupDir, $this->plugin->directory, null, ['delete' => true, 'override' => true]); + $flags = \FilesystemIterator::SKIP_DOTS; + $iterator = new \RecursiveDirectoryIterator($this->backupDir, $flags); + (new Filesystem())->mirror($this->backupDir, $this->plugin->directory, $iterator, ['delete' => true, 'override' => true]); } /**