Fixed #17806 -- Fixed off-by-n error in the CachedStaticFilesStorage that prevented it from finding files in nested directories. Many thanks to lpetre.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17622 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel 2012-03-02 11:29:14 +00:00
parent 746987f916
commit e88a65660f
3 changed files with 6 additions and 2 deletions

View file

@ -160,7 +160,7 @@ class CachedFilesMixin(object):
if sub_level:
if sub_level == 1:
parent_level -= 1
start, end = parent_level, sub_level - 1
start, end = parent_level, 1
else:
start, end = 1, sub_level - 1
joined_result = '/'.join(name_parts[:-start] + url_parts[end:])