sftp: only remove src after an atomic copy during move

Shout-out to @Suor for pointing this out
This commit is contained in:
Mr. Outis
2019-11-05 10:02:41 -06:00
parent 62c5e12d43
commit 0103f3330f
+1 -2
View File
@@ -196,8 +196,7 @@ class SSHConnection:
self.sftp.rename(src, dst)
except OSError:
self._atomic_copy(src, dst)
self.remove(src)
self.remove(src)
def _atomic_copy(self, src, dst):
tmp = tmp_fname(dst)