1
This commit is contained in:
parent
fdd98f0152
commit
edc4ada5b5
3
hlna.py
3
hlna.py
@ -381,14 +381,17 @@ def modextract(id_mod, id_game_workshop):
|
|||||||
for dirpath, dirnames, filenames in os.walk(mod_steam_workshop):
|
for dirpath, dirnames, filenames in os.walk(mod_steam_workshop):
|
||||||
for dname in dirnames:
|
for dname in dirnames:
|
||||||
os.makedirs(os.path.join(modextractdir, os.path.relpath(os.path.join(dirpath, dname), mod_steam_workshop)), exist_ok=True)
|
os.makedirs(os.path.join(modextractdir, os.path.relpath(os.path.join(dirpath, dname), mod_steam_workshop)), exist_ok=True)
|
||||||
|
|
||||||
# for fname in filenames:
|
# for fname in filenames:
|
||||||
# if not os.path.isfile(os.path.join(mod_steam_workshop, fname)) and not os.path.isfile(os.path.join(mod_steam_workshop, fname + ".z")):
|
# if not os.path.isfile(os.path.join(mod_steam_workshop, fname)) and not os.path.isfile(os.path.join(mod_steam_workshop, fname + ".z")):
|
||||||
# os.unlink(os.path.join(modextractdir, fname))
|
# os.unlink(os.path.join(modextractdir, fname))
|
||||||
|
|
||||||
for dname in dirnames:
|
for dname in dirnames:
|
||||||
if not os.path.isdir(os.path.join(mod_steam_workshop, dname)):
|
if not os.path.isdir(os.path.join(mod_steam_workshop, dname)):
|
||||||
shutil.rmtree(os.path.join(modextractdir, os.path.relpath(os.path.join(dirpath, dname), mod_steam_workshop)))
|
shutil.rmtree(os.path.join(modextractdir, os.path.relpath(os.path.join(dirpath, dname), mod_steam_workshop)))
|
||||||
|
|
||||||
for root, dirs, files in os.walk(mod_steam_workshop):
|
for root, dirs, files in os.walk(mod_steam_workshop):
|
||||||
|
print_line(files)
|
||||||
for name in files:
|
for name in files:
|
||||||
if not (name.endswith(".z") or name.endswith(".z.uncompressed_size")):
|
if not (name.endswith(".z") or name.endswith(".z.uncompressed_size")):
|
||||||
srcfile = os.path.join(root, name)
|
srcfile = os.path.join(root, name)
|
||||||
|
Loading…
Reference in New Issue
Block a user