feat: make dir if it doesn't exist
This commit is contained in:
parent
0af50c21ae
commit
2b09371cbf
@ -43,6 +43,9 @@ def post_detect(file: Image, strength: DetectionStrength):
|
||||
print("\nWorking on: " + file_name)
|
||||
print("\nStrength: " + strength + "\n")
|
||||
|
||||
if not os.path.exists("data/"):
|
||||
os.makedirs("data")
|
||||
|
||||
with open("data/" + file_name, "wb") as f:
|
||||
f.write(b64decode(file.file_contents))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user