1
0
mirror of https://github.com/ciromattia/kcc synced 2026-05-11 02:02:19 +00:00

Improved 7zip detection

This commit is contained in:
Paweł Jastrzębski
2015-01-03 09:17:00 +01:00
parent 2768e622f2
commit 180123fee2
2 changed files with 8 additions and 1 deletions

View File

@@ -52,3 +52,9 @@ def md5Checksum(filePath):
break
m.update(data)
return m.hexdigest()
def check7ZFile(filePath):
with open(filePath, 'rb') as fh:
header = fh.read(6)
return header == b"7z\xbc\xaf'\x1c"