When renaming temp differential dir to final, add support for when we're using ssh
This commit is contained in:
parent
54321e7ec1
commit
9d66f59113
@ -403,6 +403,15 @@ class MikesBackup:
|
||||
self.log("Renaming temporary directory")
|
||||
self.log("Old: " + destination_dir_in_progress)
|
||||
self.log("New: " + destination_dir_final)
|
||||
if self.is_using_ssh():
|
||||
return_code, stdout, stderr = self.execute_remote_ssh_command([
|
||||
"mv",
|
||||
destination_dir_in_progress,
|
||||
destination_dir_final
|
||||
])
|
||||
if return_code != 0:
|
||||
raise Exception("Failed to move temporary diff directory to its final home")
|
||||
else:
|
||||
os.rename(destination_dir_in_progress, destination_dir_final)
|
||||
self.log("Rename was successful")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user