Factorio: fix files from mod base directory not being grabbed correctly in non-apworld ()

This commit is contained in:
Fabian Dill 2023-12-21 04:26:41 +01:00 committed by GitHub
parent 8842f5d5c7
commit 0d929b81e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
worlds/factorio

View File

@ -177,7 +177,7 @@ def generate_mod(world: "Factorio", output_directory: str):
else:
basepath = os.path.join(os.path.dirname(__file__), "data", "mod")
for dirpath, dirnames, filenames in os.walk(basepath):
base_arc_path = versioned_mod_name+"/"+os.path.relpath(dirpath, basepath)
base_arc_path = (versioned_mod_name+"/"+os.path.relpath(dirpath, basepath)).rstrip("/.\\")
for filename in filenames:
mod.writing_tasks.append(lambda arcpath=base_arc_path+"/"+filename,
file_path=os.path.join(dirpath, filename):