From 3dc0a06ffefcbdcc61f6608253ae4925c4788f99 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Wed, 15 Oct 2014 23:53:56 +0200 Subject: [PATCH] local: Fix skipping of hidden file/directories --- mopidy/local/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mopidy/local/commands.py b/mopidy/local/commands.py index 098bd9a9..5cf9f64f 100644 --- a/mopidy/local/commands.py +++ b/mopidy/local/commands.py @@ -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))