Merge pull request #1555 from dondelelcaro/bug/remove_dirs_starting_with_period

local: Do not scan first-level dirs starting with "." (Fixes #1559)
This commit is contained in:
Thomas Adamcik 2016-10-02 13:46:34 +02:00 committed by GitHub
commit bf248751ee

View File

@ -118,7 +118,7 @@ class ScanCommand(commands.Command):
relpath = os.path.relpath(abspath, media_dir)
uri = translator.path_to_local_track_uri(relpath)
if b'/.' in relpath:
if b'/.' in relpath or relpath.startswith(b'.'):
logger.debug('Skipped %s: Hidden directory/file.', uri)
elif relpath.lower().endswith(excluded_file_extensions):
logger.debug('Skipped %s: File extension excluded.', uri)