mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix file unzip
This commit is contained in:
parent
9fcd510be2
commit
704ffc2742
@ -443,13 +443,24 @@ class Helpers:
|
|||||||
full_root_path = temp_dir
|
full_root_path = temp_dir
|
||||||
|
|
||||||
for item in os.listdir(full_root_path):
|
for item in os.listdir(full_root_path):
|
||||||
try:
|
print(item)
|
||||||
FileHelpers.move_dir(
|
if os.path.isdir(os.path.join(full_root_path, item)):
|
||||||
os.path.join(full_root_path, item),
|
print("dir")
|
||||||
os.path.join(new_dir, item),
|
try:
|
||||||
)
|
FileHelpers.move_dir(
|
||||||
except Exception as ex:
|
os.path.join(full_root_path, item),
|
||||||
logger.error(f"ERROR IN ZIP IMPORT: {ex}")
|
os.path.join(new_dir, item),
|
||||||
|
)
|
||||||
|
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:
|
except Exception as ex:
|
||||||
print(ex)
|
print(ex)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user