提交 933a8617 编写于 作者: L ltx 提交者: Gitee

fix error when special char in path_name

syntax error occur when special char in path_name, e.g. Taishan-200-(Model-2280)
上级 18a534d2
......@@ -196,7 +196,7 @@ def upload_job():
try:
with open(tar_job, 'wb') as f:
f.write(base64.b64decode(filetext))
os.system("tar xf %s -C %s" % (tar_job, os.path.dirname(dir_job)))
os.system("tar xf '%s' -C '%s'" % (tar_job, os.path.dirname(dir_job)))
except Exception as e:
print(e)
abort(400)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册