Ticket #16964: patch.diff

File patch.diff, 565 bytes (added by Jonas H., 13 years ago)

Patch that fixes the bug

  • django/core/files/base.py

    diff --git a/django/core/files/base.py b/django/core/files/base.py
    index 6204d71..722324a 100644
    a b class File(FileProxyMixin):  
    108108        self.close()
    109109
    110110    def open(self, mode=None):
    111         if not self.closed:
    112             self.seek(0)
    113         elif self.name and os.path.exists(self.name):
     111        if self.name and os.path.exists(self.name):
    114112            self.file = open(self.name, mode or self.mode)
    115113        else:
    116114            raise ValueError("The file cannot be reopened.")
Back to Top