mirror of
https://github.com/spl0k/supysonic.git
synced 2024-11-09 19:52:16 +00:00
Scanner: handle permission errors
This commit is contained in:
parent
954c75bc35
commit
3fd748cc5a
@ -69,7 +69,13 @@ class Scanner:
|
||||
scanned = 0
|
||||
while to_scan:
|
||||
path = to_scan.pop()
|
||||
for f in os.listdir(path):
|
||||
|
||||
try:
|
||||
entries = os.listdir(path)
|
||||
except OSError:
|
||||
continue
|
||||
|
||||
for f in entries:
|
||||
try: # test for badly encoded filenames
|
||||
f.encode('utf-8')
|
||||
except UnicodeError:
|
||||
|
Loading…
Reference in New Issue
Block a user