mirror of
https://github.com/SinTan1729/recipe-box-for-wikijs.git
synced 2025-04-11 14:56:04 -05:00
fix: Ensure existence of directory
This commit is contained in:
parent
2aa5a0ff23
commit
58da47c04a
1 changed files with 2 additions and 4 deletions
|
@ -62,10 +62,8 @@ def valid_filename(directory, filename=None):
|
||||||
directory = os.path.dirname(directory)
|
directory = os.path.dirname(directory)
|
||||||
|
|
||||||
# Allow for directories.
|
# Allow for directories.
|
||||||
try:
|
ensure_directory_exists(directory)
|
||||||
items = os.listdir(directory)
|
items = os.listdir(directory)
|
||||||
except:
|
|
||||||
items = []
|
|
||||||
|
|
||||||
if filename in items:
|
if filename in items:
|
||||||
count = 1
|
count = 1
|
||||||
|
|
Loading…
Reference in a new issue