From: Daniel Martí Date: Mon, 14 Sep 2015 05:22:03 +0000 (-0700) Subject: scanner: avoid checking if usual files are binary X-Git-Tag: 0.5.0~97 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=15e14075cfa497a312a824911277004c4746f58e;p=fdroidserver.git scanner: avoid checking if usual files are binary --- diff --git a/fdroidserver/scanner.py b/fdroidserver/scanner.py index 7f7c6aa9..04d846d5 100644 --- a/fdroidserver/scanner.py +++ b/fdroidserver/scanner.py @@ -155,6 +155,11 @@ def scan_source(build_dir, root_dir, thisbuild): count += handleproblem('usual suspect at line %d' % i, fd, fp) break + # These files are often found - avoid checking if they are binary + # to speed up the scanner + elif ext in ['xml', 'md', 'txt', 'html', 'sh', 'png']: + pass + elif is_binary(fp): if is_executable(fp): count += handleproblem('executable binary', fd, fp)