fix command by adding quotes for roms with spaces

This commit is contained in:
AltoXorg 2022-04-28 09:31:49 +08:00
commit 219efe06ec

View file

@ -45,7 +45,7 @@ def BuildOTR(xmlPath, rom):
shutil.copytree("assets", "Extract/assets") shutil.copytree("assets", "Extract/assets")
execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPD/ZAPD.out" execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPD/ZAPD.out"
execStr += " ed -i %s -b %s -fl CFG\\filelists -o placeholder -osf placeholder -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath, rom) execStr += " ed -i %s -b \"%s\" -fl CFG\\filelists -o placeholder -osf placeholder -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath, rom)
print(execStr) print(execStr)
exitValue = os.system(execStr) exitValue = os.system(execStr)