Commit 15ef1eea authored by wanli's avatar wanli

update

parent cb29e4ed
...@@ -121,7 +121,10 @@ class DownloadManager(object): ...@@ -121,7 +121,10 @@ class DownloadManager(object):
if not os.path.exists(tf): if not os.path.exists(tf):
return False, "{} not found".format(tf) return False, "{} not found".format(tf)
shutil.copy(tf, build_source_path) filename = os.path.basename(tf)
name, suffix = os.path.splitext(filename)
name = re.sub(r"_\d{14}$", "", name)
shutil.copy(tf, os.sep.join([build_source_path, name + suffix]))
temp = [] temp = []
# 读取当前系统所有应用及其资源文件 # 读取当前系统所有应用及其资源文件
......
...@@ -62,7 +62,7 @@ def get(): ...@@ -62,7 +62,7 @@ def get():
# 读取epk文件,按照格式返回相应结构体数据 # 读取epk文件,按照格式返回相应结构体数据
ret = "" ret = ""
if os.path.exists(result): if os.path.exists(result):
with open(result, "r") as f: with open(result, "rb") as f:
ret = f.read() ret = f.read()
return ret return ret
except Exception as e: except Exception as e:
......
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