Fixed bugs
Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
parent
3f74daf555
commit
79e9102424
1 changed files with 5 additions and 4 deletions
|
@ -167,15 +167,16 @@ while running:
|
|||
|
||||
for part in os.listdir(input_dir):
|
||||
#run("rm -f " + output + "/" + part + "/" + area_major + "/" + area + ".txz", shell=True)
|
||||
run("mkdir -p " + tmp_dir + "/" + area)
|
||||
|
||||
# If there is an archive, we need to extract it first and remove old data
|
||||
if os.path.exists(output + "/" + part + "/" + area_major + "/" + area + ".txz"):
|
||||
run("bash -c 'cd " + tmp_dir + "/" + area + " && tar -xf " + output + "/" + part + "/" + area_major + "/" + area + ".txz && rm *" + name + "*'")
|
||||
run("bash -c 'cd " + tmp_dir + " && tar -xf " + output + "/" + part + "/" + area_major + "/" + area + ".txz && rm " + area + "/*" + name + "*'", shell=True)
|
||||
else:
|
||||
run("mkdir -p " + tmp_dir + "/" + area, shell=True)
|
||||
|
||||
# If there's new scenery copy it into the tmp dir
|
||||
if os.path.exists(input_dir + "/" + part + "/" + area_major + "/" + area + "/" + name + ".stg"):
|
||||
run("cp " + input_dir + "/" + part + "/" + area_major + "/" + area + "/*" + name + "* " + tmp_dir + "/" + area + "/")
|
||||
run("cp " + input_dir + "/" + part + "/" + area_major + "/" + area + "/*" + name + "* " + tmp_dir + "/" + area + "/", shell=True)
|
||||
|
||||
# If the scenery is not empty, package it
|
||||
if os.listdir(tmp_dir + "/" + area):
|
||||
|
@ -190,7 +191,7 @@ while running:
|
|||
update_index(output, part, area, area_major)
|
||||
|
||||
# Clean up
|
||||
run("rm -r " + tmp_dir + "/" + area)
|
||||
run("rm -r " + tmp_dir + "/" + area, shell=True)
|
||||
|
||||
print("Packaging " + name + " done")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue