Ticket #17812: 17812.diff

File 17812.diff, 703 bytes (added by apiterimov, 13 years ago)

This is a patch which helped me to solve the problem.

  • django/core/files/storage.py

     
    209209        return name
    210210
    211211    def delete(self, name):
    212         name = self.path(name)
    213         # If the file exists, delete it from the filesystem.
    214         if os.path.exists(name):
    215             os.remove(name)
     212        if name:
     213            name = self.path(name)
     214            # If the file exists, delete it from the filesystem.
     215            if os.path.exists(name):
     216                os.remove(name)
    216217
    217218    def exists(self, name):
    218219        return os.path.exists(self.path(name))
Back to Top