1. Bruno Clermont
  2. django-storages


Florian Hahn  committed b183233

use absolute path to check if file already exists

Comments (0)

Files changed (1)

File storages/backends/hashpath.py Modified

View file
  • Ignore whitespace
  • Hide word diff
         dir_name, file_name = os.path.split(name)
         # Return the name if the file is already there
-        if os.path.exists(name):
+        if os.path.exists(self.path(name)):
             return name
         # Try to create the directory relative to the media root