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 Feb 5, 2019
1 parent 7bc4cda commit 9387ed1
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 9387ed1

Please sign in to comment.