folder might not exist

This commit is contained in:
j 2017-06-14 13:00:44 +02:00
parent e30ae03f5f
commit 3e589c454a

View file

@ -390,6 +390,9 @@ def iexists(path):
folder = '.'
else:
folder = os.path.dirname(path)
try:
files = os.listdir(folder)
except FileNotFoundError:
return False
files = {os.path.basename(f).lower() for f in files}
return name in files