Enforce separator always being in whitelist

This commit is contained in:
Kristóf Tóth 2018-09-02 16:15:24 +02:00
parent fee4bcb24d
commit a47777ce23
2 changed files with 1 additions and 2 deletions

1
cli.py
View File

@ -53,7 +53,6 @@ if __name__ == '__main__':
whitelist = set(args.whitelist.split()) whitelist = set(args.whitelist.split())
# modify whitelist based on arguments # modify whitelist based on arguments
whitelist.add(args.separator)
if args.allow: if args.allow:
whitelist = whitelist.union(set(args.allow)) whitelist = whitelist.union(set(args.allow))
if args.disallow: if args.disallow:

View File

@ -27,7 +27,7 @@ class Normalisename:
@property @property
def whitelist(self): def whitelist(self):
return self._whitelist return self._whitelist.union({self.separator})
def __call__(self, files): def __call__(self, files):
for path in files: for path in files: