[FIX]RsyncVolumes : fix exclude empty, again

This commit is contained in:
Fabien BOURGEOIS 2021-03-13 08:38:44 +01:00
parent 8da0ae0ec8
commit 9529806dea
1 changed files with 2 additions and 3 deletions

View File

@ -36,9 +36,8 @@ def zipdir(path, ziph):
for root, dirs, files in walk(path):
for file in files:
pfile = osjoin(root, file)
if (isfile(pfile)
and EXCLUDE_WORDS
and all(map(lambda w: w not in pfile, EXCLUDE_WORDS))):
is_excluded = EXCLUDE_WORDS and any(map(lambda w: w in pfile, EXCLUDE_WORDS))
if (isfile(pfile) and not is_excluded):
ziph.write(pfile)
print('Compression started')