#18 File upload in certain folders

* adds try-except for removing folders in case of non existence or changed folder names on the hard drive
This commit is contained in:
mipel
2021-09-17 09:43:03 +02:00
parent 1fd0162629
commit a77e6bff4c
3 changed files with 30 additions and 8 deletions

View File

@@ -142,4 +142,8 @@ class EmaDocument(AbstractDocument):
# If a folder path has been set, we need to delete the whole folder!
if folder_path is not None:
shutil.rmtree(folder_path)
try:
shutil.rmtree(folder_path)
except FileNotFoundError:
# Folder seems to be missing already...
pass