1
0
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:
Adrian Holovaty 2006-04-23 21:30:04 +00:00
parent 45be99d486
commit c551eac5e4

View File

@ -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):