diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wikipediafs/fs.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wikipediafs/fs.py b/src/wikipediafs/fs.py index 3792129..78dcf5e 100644 --- a/src/wikipediafs/fs.py +++ b/src/wikipediafs/fs.py @@ -42,6 +42,11 @@ class ArticleDir: def is_valid_file(self, path): file_name = self.get_article_file_name(path) + + for forbidden_char in ('#', '<', '>', '[', ']', '|', '{', '}'): + if file_name.count(forbidden_char) > 0: + return False + if file_name[-3:] == ".mw": return True else: |