Commit 97dfca51 authored by wanli's avatar wanli

更ä修复epk.py获取文件名后缀bug

parent c8a8e20d
...@@ -106,7 +106,7 @@ class EpkApp(object): ...@@ -106,7 +106,7 @@ class EpkApp(object):
fsize = jspath.info.size fsize = jspath.info.size
fbasename, fext = os.path.splitext(jspath.info.name) fbasename, fext = os.path.splitext(jspath.info.name)
if fext in ["", "exe", "dll", "nv", "conf"]: if fext in ["", ".exe", ".dll", ".nv", ".conf"]:
continue continue
finfo = { finfo = {
...@@ -123,7 +123,7 @@ class EpkApp(object): ...@@ -123,7 +123,7 @@ class EpkApp(object):
else: else:
files.append(finfo) files.append(finfo)
if fext == "evue": if fext == ".evue":
self.fileMD5(finfo) self.fileMD5(finfo)
return files return files
...@@ -144,9 +144,9 @@ class EpkApp(object): ...@@ -144,9 +144,9 @@ class EpkApp(object):
filecontent = f.read() filecontent = f.read()
newmd5 = self.md5(filecontent) newmd5 = self.md5(filecontent)
with open(md5path, "wb") as f: with open(md5path, "wb") as f:
f.write(newmd5) f.write(newmd5)
return newmd5 return newmd5
def sign(self, content): def sign(self, content):
......
...@@ -98,7 +98,7 @@ class EpkApp(object): ...@@ -98,7 +98,7 @@ class EpkApp(object):
fsize = jspath.info.size fsize = jspath.info.size
fbasename, fext = os.path.splitext(jspath.info.name) fbasename, fext = os.path.splitext(jspath.info.name)
if fext in ["", "exe", "dll", "nv", "conf"]: if fext in ["", ".exe", ".dll", ".nv", ".conf"]:
continue continue
finfo = { finfo = {
...@@ -114,7 +114,7 @@ class EpkApp(object): ...@@ -114,7 +114,7 @@ class EpkApp(object):
else: else:
files.append(finfo) files.append(finfo)
if fext == "evue": if fext == ".evue":
self.fileMD5(finfo) self.fileMD5(finfo)
return files return files
......
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