summaryrefslogtreecommitdiff
path: root/django/forms/fields.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/forms/fields.py')
-rw-r--r--django/forms/fields.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/forms/fields.py b/django/forms/fields.py
index 56d0e316f2..6f88fb2662 100644
--- a/django/forms/fields.py
+++ b/django/forms/fields.py
@@ -1102,8 +1102,8 @@ class FilePathField(ChoiceField):
continue
full_file = os.path.join(self.path, f)
if (((self.allow_files and os.path.isfile(full_file)) or
- (self.allow_folders and os.path.isdir(full_file))) and
- (self.match is None or self.match_re.search(f))):
+ (self.allow_folders and os.path.isdir(full_file))) and
+ (self.match is None or self.match_re.search(f))):
self.choices.append((full_file, f))
except OSError:
pass