Skip to content

Commit dba131f

Browse files
committed
Closes #13.
Due to the missing \FilesystemIterator::SKIP_DOTS flag, the cleanup worker attempted to delete ".." as a child of a directory, which resulted in the described error. This commit adds the corresponding flag.
1 parent 14b9b58 commit dba131f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/application.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ protected function saveContainer() {
156156
* @param string $srcDir Source directory to compare xml structure with
157157
*/
158158
protected function cleanup($srcDir) {
159-
$worker = new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator($this->xmlDir), \RecursiveIteratorIterator::CHILD_FIRST );
159+
$worker = new \RecursiveIteratorIterator(
160+
new \RecursiveDirectoryIterator($this->xmlDir, \FilesystemIterator::SKIP_DOTS),
161+
\RecursiveIteratorIterator::CHILD_FIRST
162+
);
160163
$len = strlen($this->xmlDir);
161164
$srcPath = realpath($srcDir);
162165

@@ -204,4 +207,4 @@ protected function cleanup($srcDir) {
204207
}
205208

206209
}
207-
}
210+
}

0 commit comments

Comments
 (0)