diff options
author | Dan Fandrich <danf@mageia.org> | 2013-12-26 18:01:55 +0100 |
---|---|---|
committer | Dan Fandrich <danf@mageia.org> | 2013-12-26 18:01:55 +0100 |
commit | 81a950a120451982ab4077916a2e66dc7f269d29 (patch) | |
tree | 551a0f8e03af186671a4ff753288c2b2d264dd2c | |
parent | 487123b27742a74ddfba8b3d69df2436513ae0df (diff) | |
download | mgarepo-81a950a120451982ab4077916a2e66dc7f269d29.tar mgarepo-81a950a120451982ab4077916a2e66dc7f269d29.tar.gz mgarepo-81a950a120451982ab4077916a2e66dc7f269d29.tar.bz2 mgarepo-81a950a120451982ab4077916a2e66dc7f269d29.tar.xz mgarepo-81a950a120451982ab4077916a2e66dc7f269d29.zip |
Improved detection of binary files
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | MgaRepo/binrepo.py | 2 |
2 files changed, 5 insertions, 0 deletions
@@ -1,3 +1,6 @@ +* 1.10.6 +- Improved detection of binary files + * 1.10.5 - Added README.BINREPO and youridb.sql to Python manifest - Don't block waiting for stderr when displaying subprocess output (#952) diff --git a/MgaRepo/binrepo.py b/MgaRepo/binrepo.py index 13e2c45..ee429f6 100644 --- a/MgaRepo/binrepo.py +++ b/MgaRepo/binrepo.py @@ -34,6 +34,8 @@ def is_binary(path): st = os.stat(path) if st[stat.ST_SIZE] >= maxsize: return True + if open(path).read(0x10000).find('\0') >= 0: + return True return False def find_binaries(paths): |