local: Fix skipping of hidden file/directories

This commit is contained in:
Thomas Adamcik 2014-10-15 23:53:56 +02:00
parent 063c757570
commit 3dc0a06ffe

View File

@ -77,8 +77,10 @@ class ScanCommand(commands.Command):
file_mtimes, file_errors = path.find_mtimes(media_dir)
# TODO: Not sure if we want to keep this, but for now lets filter these
# Could be replaced with passing in a predicate to the find function?
for name in file_mtimes.keys():
if name.startswith('.'):
if b'/.' in name:
logger.debug('Skipping hidden file/directory: %r', name)
del file_mtimes[name]
logger.info('Found %d files in media_dir.', len(file_mtimes))