Fix file unzip

This commit is contained in:
Andrew 2022-04-14 20:03:19 -04:00
parent 9fcd510be2
commit 704ffc2742

View File

@ -443,6 +443,9 @@ class Helpers:
full_root_path = temp_dir
for item in os.listdir(full_root_path):
print(item)
if os.path.isdir(os.path.join(full_root_path, item)):
print("dir")
try:
FileHelpers.move_dir(
os.path.join(full_root_path, item),
@ -450,6 +453,14 @@ class Helpers:
)
except Exception as ex:
logger.error(f"ERROR IN ZIP IMPORT: {ex}")
else:
try:
FileHelpers.move_file(
os.path.join(full_root_path, item),
os.path.join(new_dir, item),
)
except Exception as ex:
logger.error(f"ERROR IN ZIP IMPORT: {ex}")
except Exception as ex:
print(ex)
else: