folder might not exist
This commit is contained in:
parent
e30ae03f5f
commit
3e589c454a
1 changed files with 4 additions and 1 deletions
|
@ -390,6 +390,9 @@ def iexists(path):
|
|||
folder = '.'
|
||||
else:
|
||||
folder = os.path.dirname(path)
|
||||
files = os.listdir(folder)
|
||||
try:
|
||||
files = os.listdir(folder)
|
||||
except FileNotFoundError:
|
||||
return False
|
||||
files = {os.path.basename(f).lower() for f in files}
|
||||
return name in files
|
||||
|
|
Loading…
Reference in a new issue