Skip to content

Commit

Permalink
Fixed #3629 -- In oldforms, differentiate files in a recursive FilePa…
Browse files Browse the repository at this point in the history
…thField.

Thanks, James Turnbull.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4896 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
malcolmt committed Apr 1, 2007
1 parent 78b86d7 commit 96bf5e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion django/oldforms/__init__.py
Expand Up @@ -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 root, dirs, files in os.walk(path):
for f in files: for f in files:
if match is None or match_re.search(f): 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: else:
try: try:
for f in os.listdir(path): for f in os.listdir(path):
Expand Down

0 comments on commit 96bf5e8

Please sign in to comment.