Commit 253e2f1f authored by wanliofficial's avatar wanliofficial

🐞 fix(view/api.py): 修复生成字节码文件bug

parent 5287727b
...@@ -191,11 +191,9 @@ def action_build(): ...@@ -191,11 +191,9 @@ def action_build():
fd.write(text) fd.write(text)
result = subprocess.call("./executable -c {file}".format(file=file), shell=True) result = subprocess.call("./executable -c {file}".format(file=file), shell=True)
logger.info(result) new_name = "{}.{}".format(Path(file).name, "bc")
os.rename(os.sep.join([os.getcwd(), "executable.bc"]), os.sep.join([os.getcwd(), new_name]))
t = Path(file) dst_files.append(Path(os.getcwd()).joinpath(new_name))
res = t.rename("{}.{}".format(t.name, "bc"))
dst_files.append(res)
for file in dst_files: for file in dst_files:
z.write(file.resolve().as_posix(), arcname=file.name) z.write(file.resolve().as_posix(), arcname=file.name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment