mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
magic-removal: Fixed #1536 -- FilePathField with recursive=True no longer loses subdirectory. Thanks, Andy Dustman
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
45be99d486
commit
c551eac5e4
@ -879,7 +879,7 @@ class FilePathField(SelectField):
|
||||
for root, dirs, files in os.walk(path):
|
||||
for f in files:
|
||||
if match is None or match_re.search(f):
|
||||
choices.append((os.path.join(path, f), f))
|
||||
choices.append((os.path.join(root, f), f))
|
||||
else:
|
||||
try:
|
||||
for f in os.listdir(path):
|
||||
|
Loading…
x
Reference in New Issue
Block a user