Skip to content
Browse files

Fixed #3629 -- In oldforms, differentiate files in a recursive FilePa…

…thField.

Thanks, James Turnbull.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4896 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 78b86d7 commit 96bf5e853c42770772dcc3fc1fba5fcf85733a11 @malcolmt malcolmt committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 django/oldforms/__init__.py
View
3 django/oldforms/__init__.py
@@ -923,7 +923,8 @@ def __init__(self, field_name, path, match=None, recursive=False, is_required=Fa
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(root, f), f))
+ f = os.path.join(root, f)
+ choices.append((f, f.replace(path, "", 1)))
else:
try:
for f in os.listdir(path):

0 comments on commit 96bf5e8

Please sign in to comment.
Something went wrong with that request. Please try again.