Skip to content

Commit

Permalink
[Scan] Skip directories prefixed with a dot (close #353).
Browse files Browse the repository at this point in the history
  • Loading branch information
lGuillaume124 committed Jan 27, 2019
1 parent 556d66c commit bff41dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Lib/AudioFileScanner/AudioFileScanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public function scan($new = true, $orphans = false, $outdated = false, $batch =
$directory = new Folder($directory);

// Skip symlinks to avoid infinite loops
if (is_link($directory->path)) {
// Skip dotfiles to avoid scanning "hidden" directories
if (is_link($directory->path) || preg_match('/^.*\/\..*$/', $directory->path) === 1) {
continue;
}

Expand Down

0 comments on commit bff41dd

Please sign in to comment.