Ticket #8455: issue-8455.diff
File issue-8455.diff, 953 bytes (added by , 16 years ago) |
---|
-
django/core/files/storage.py
161 161 finally: 162 162 locks.unlock(fd) 163 163 os.close(fd) 164 except OSError: 165 # Ooops, we need a new file name. 166 name = self.get_available_name(name) 167 full_path = self.path(name) 164 except OSError, e: 165 # error number 17 is 'File exists' 166 if e.errno == 17: 167 # Ooops, we need a new file name. 168 name = self.get_available_name(name) 169 full_path = self.path(name) 170 else: 171 raise 168 172 else: 169 173 # OK, the file save worked. Break out of the loop. 170 174 break