mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-06 03:39:51 +01:00
Calling _findfilesstartingwith with a non-existing folder would raise an exception, will return an empty list now
This commit is contained in:
@@ -65,7 +65,8 @@ class Cache(object):
|
||||
|
||||
def _findfilesstartingwith(self,pattern,folder):
|
||||
files = []
|
||||
for fname in os.listdir(folder):
|
||||
if os.path.exists(folder):
|
||||
for fname in os.listdir(folder):
|
||||
if fname.startswith(pattern):
|
||||
files.append(os.path.join(folder,fname))
|
||||
return files
|
||||
|
||||
Reference in New Issue
Block a user