1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 22:40:12 +01:00

scanner: don't error on partially used globs

This meant that using something like `scanignore=*` would error if there were
ignores happening in some directories/files, but not all.

Fixes #110
This commit is contained in:
Daniel Martí 2015-10-03 17:00:22 -07:00
parent 59f5d19dfe
commit d8e1f296e0

View File

@ -72,24 +72,26 @@ def scan_source(build_dir, root_dir, thisbuild):
if r.match(s):
yield n
scanignore = common.getpaths(build_dir, thisbuild['scanignore'])
scandelete = common.getpaths(build_dir, thisbuild['scandelete'])
scanignore = common.getpaths_map(build_dir, thisbuild['scanignore'])
scandelete = common.getpaths_map(build_dir, thisbuild['scandelete'])
scanignore_worked = set()
scandelete_worked = set()
def toignore(fd):
for p in scanignore:
if fd.startswith(p):
scanignore_worked.add(p)
return True
for k, paths in scanignore.iteritems():
for p in paths:
if fd.startswith(p):
scanignore_worked.add(k)
return True
return False
def todelete(fd):
for p in scandelete:
if fd.startswith(p):
scandelete_worked.add(p)
return True
for k, paths in scandelete.iteritems():
for p in paths:
if fd.startswith(p):
scandelete_worked.add(k)
return True
return False
def ignoreproblem(what, fd, fp):