mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 15:32:30 +03: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:
parent
59f5d19dfe
commit
d8e1f296e0
1 changed files with 12 additions and 10 deletions
|
@ -72,23 +72,25 @@ 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:
|
||||
for k, paths in scanignore.iteritems():
|
||||
for p in paths:
|
||||
if fd.startswith(p):
|
||||
scanignore_worked.add(p)
|
||||
scanignore_worked.add(k)
|
||||
return True
|
||||
return False
|
||||
|
||||
def todelete(fd):
|
||||
for p in scandelete:
|
||||
for k, paths in scandelete.iteritems():
|
||||
for p in paths:
|
||||
if fd.startswith(p):
|
||||
scandelete_worked.add(p)
|
||||
scandelete_worked.add(k)
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue