1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-25 09:45:02 +00:00

Fix multiprocessing usage for extract_assets as well (#575)

Co-authored-by: zelda2774 <zelda2774@invalid>
This commit is contained in:
zelda2774 2020-12-29 00:37:52 +01:00 committed by GitHub
parent ed17c81a33
commit 1e6bd7f623
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,12 +24,13 @@ def ExtractFunc(fullPath):
else: else:
Extract(fullPath, outPath) Extract(fullPath, outPath)
def main():
xmlFiles = [] xmlFiles = []
for currentPath, folders, files in os.walk("assets"): for currentPath, folders, files in os.walk("assets"):
for file in files: for file in files:
fullPath = os.path.join(currentPath, file) fullPath = os.path.join(currentPath, file)
if file.endswith(".xml") and currentPath.startswith("assets/xml"): if file.endswith(".xml") and currentPath.startswith("assets/xml/"):
outPath = ("assets/" + fullPath.split("assets/xml/")[1]).split(".xml")[0] outPath = ("assets/" + fullPath.split("assets/xml/")[1]).split(".xml")[0]
xmlFiles.append(fullPath) xmlFiles.append(fullPath)
@ -40,3 +41,6 @@ p.map(ExtractFunc, xmlFiles)
#os.system("make resources") #os.system("make resources")
if __name__ == "__main__":
main()