Use the storage directly to get the path.

This commit is contained in:
Jannis Leidel
2011-05-13 11:59:29 +02:00
parent 463ca0336d
commit c5a369f185

View File

@@ -60,10 +60,8 @@ class Compressor(object):
if settings.DEBUG and self.finders:
filename = self.finders.find(basename)
# secondly try finding the file in the root
else:
root_filename = os.path.join(settings.COMPRESS_ROOT, basename)
if os.path.exists(root_filename):
filename = root_filename
elif self.storage.exists(basename):
filename = self.storage.path(basename)
if filename:
return filename
# or just raise an exception as the last resort