mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-27 04:49:18 +00:00
Handle error for invalid zip file (#494)
This commit is contained in:
parent
b682655e56
commit
c3a4bf876f
@ -185,11 +185,12 @@ def unzip_file(file_name, member=False, members=False):
|
|||||||
f"unzip -d {server_info['image_dir']} -n -j "
|
f"unzip -d {server_info['image_dir']} -n -j "
|
||||||
f"{server_info['image_dir']}/{file_name}"
|
f"{server_info['image_dir']}/{file_name}"
|
||||||
))
|
))
|
||||||
for path in members:
|
if members:
|
||||||
if path.endswith(PROPERTIES_SUFFIX):
|
for path in members:
|
||||||
name = PurePath(path).name
|
if path.endswith(PROPERTIES_SUFFIX):
|
||||||
rename_file(f"{server_info['image_dir']}/{name}", f"{CFG_DIR}/{name}")
|
name = PurePath(path).name
|
||||||
prop_flag = True
|
rename_file(f"{server_info['image_dir']}/{name}", f"{CFG_DIR}/{name}")
|
||||||
|
prop_flag = True
|
||||||
else:
|
else:
|
||||||
from re import escape
|
from re import escape
|
||||||
member = escape(member)
|
member = escape(member)
|
||||||
|
Loading…
Reference in New Issue
Block a user