This commit is contained in:
Jeremy Fincher 2004-07-31 19:47:02 +00:00
parent 5a6cd1efa3
commit beb9e8cab1

View File

@ -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):