diff --git a/afew/filters/FolderNameFilter.py b/afew/filters/FolderNameFilter.py index af8ed78..2c3f322 100644 --- a/afew/filters/FolderNameFilter.py +++ b/afew/filters/FolderNameFilter.py @@ -54,7 +54,7 @@ def __transform_folders(self, folders): transformations = set() for folder in folders: if folder in self.__folder_transforms: - transformations.add(self.__folder_transforms[folder]) + transformations.update(self.__folder_transforms[folder]) else: transformations.add(folder) if self.__folder_lowercases: @@ -71,5 +71,8 @@ def __parse_transforms(self, transformation_description): transformations = dict() for rule in shlex.split(transformation_description): folder, tag = rule.split(':') - transformations[folder] = tag + try: + transformations[folder].add(tag) + except KeyError: + transformations[folder] = set([tag]) return transformations