|
|
@ -338,12 +338,12 @@ class PathFormat():
|
|
|
|
while True:
|
|
|
|
while True:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
os.replace(self.temppath, self.realpath)
|
|
|
|
os.replace(self.temppath, self.realpath)
|
|
|
|
except FileNotFoundError:
|
|
|
|
|
|
|
|
# delayed directory creation
|
|
|
|
|
|
|
|
os.makedirs(self.realdirectory)
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
except OSError:
|
|
|
|
except OSError:
|
|
|
|
# move across different filesystems
|
|
|
|
# move across different filesystems
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
|
|
|
shutil.copyfile(self.temppath, self.realpath)
|
|
|
|
|
|
|
|
except FileNotFoundError:
|
|
|
|
|
|
|
|
os.makedirs(self.realdirectory)
|
|
|
|
shutil.copyfile(self.temppath, self.realpath)
|
|
|
|
shutil.copyfile(self.temppath, self.realpath)
|
|
|
|
os.unlink(self.temppath)
|
|
|
|
os.unlink(self.temppath)
|
|
|
|
break
|
|
|
|
break
|
|
|
|