Skip to content

Commit

Permalink
Update class-wp-scss.php
Browse files Browse the repository at this point in the history
fix error when have dev folder like svn, git, node_modules
  • Loading branch information
chameron authored Aug 1, 2018
1 parent 4c2054a commit 12e0108
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions class/class-wp-scss.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function needs_compiling() {
$latest_scss = 0;
$latest_css = 0;

foreach ( new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->scss_dir)) as $sfile ) {
foreach ( new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->scss_dir), FilesystemIterator::SKIP_DOTS) as $sfile ) {
if (pathinfo($sfile->getFilename(), PATHINFO_EXTENSION) == 'scss') {
$file_time = $sfile->getMTime();

Expand All @@ -163,7 +163,7 @@ public function needs_compiling() {
}
}

foreach ( new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->css_dir)) as $cfile ) {
foreach ( new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->css_dir), FilesystemIterator::SKIP_DOTS) as $cfile ) {
if (pathinfo($cfile->getFilename(), PATHINFO_EXTENSION) == 'css') {
$file_time = $cfile->getMTime();

Expand Down

0 comments on commit 12e0108

Please sign in to comment.