Skip to content

Commit 66f4712

Browse files
committed
doing it as an array check instead
1 parent 25b68e6 commit 66f4712

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/PatternLab/Fetch.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,15 @@ protected function mirrorDist($sourceDir, $tempDirDist) {
165165
// set default vars
166166
$fsOptions = array();
167167
$emptyDir = true;
168+
$validFiles = array("README",".gitkeep",".DS_Store","styleguide");
168169

169170
// see if the source directory is empty
170171
if (is_dir($sourceDir)) {
171172
$objects = new \DirectoryIterator($sourceDir);
172173
foreach ($objects as $object) {
173-
if (!$object->isDot() && ($object->getFilename() != "README") && ($object->getFilename() != ".DS_Store")) {
174+
if (!$object->isDot() && !in_array($object->getFilename(),$validFiles)) {
174175
$emptyDir = false;
176+
break;
175177
}
176178
}
177179
}

0 commit comments

Comments
 (0)