mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 14:59:34 +01:00
Better.
This commit is contained in:
parent
5a6cd1efa3
commit
beb9e8cab1
@ -682,9 +682,8 @@ class AtomicFile(file):
|
|||||||
self.allowEmptyOverwrite = allowEmptyOverwrite
|
self.allowEmptyOverwrite = allowEmptyOverwrite
|
||||||
self.tempFilename = '%s.%s' % (filename, mktemp())
|
self.tempFilename = '%s.%s' % (filename, mktemp())
|
||||||
if tmpDir is not None:
|
if tmpDir is not None:
|
||||||
dir = os.path.dirname(self.tempFilename)
|
tempFilename = os.path.dirname(self.tempFilename)
|
||||||
dir = os.path.join(dir, tmpDir)
|
self.tempFilename = os.path.join(tmpDir, tempFilename)
|
||||||
self.tempFilename = os.path.join(dir, self.tempFilename)
|
|
||||||
super(self.__class__, self).__init__(self.tempFilename, 'w')
|
super(self.__class__, self).__init__(self.tempFilename, 'w')
|
||||||
|
|
||||||
def rollback(self):
|
def rollback(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user