1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #22336 -- Added path matching for makemessages ignore option

This fixes a regression introduced by 9012a9e200.
This commit is contained in:
Justin Hamade
2014-08-08 22:47:35 +02:00
committed by Claude Paroz
parent 09c0fa2c53
commit 8fe406864c
3 changed files with 33 additions and 18 deletions

View File

@@ -360,7 +360,8 @@ class Command(BaseCommand):
Check if the given path should be ignored or not.
"""
filename = os.path.basename(path)
ignore = lambda pattern: fnmatch.fnmatchcase(filename, pattern)
ignore = lambda pattern: (fnmatch.fnmatchcase(filename, pattern) or
fnmatch.fnmatchcase(path, pattern))
return any(ignore(pattern) for pattern in ignore_patterns)
dir_suffix = '%s*' % os.sep