diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-11-26 16:32:44 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-11-26 16:32:44 +0100 |
commit | 30e086fb530c1c0d951fe58266cd5aed21fd91be (patch) | |
tree | 087ace540916ff3a7aa1727827461f7ed1f2b131 /apps/files_external | |
parent | 2653d914d96e40541378d40c0e6c7589c789f401 (diff) | |
download | nextcloud-server-30e086fb530c1c0d951fe58266cd5aed21fd91be.tar.gz nextcloud-server-30e086fb530c1c0d951fe58266cd5aed21fd91be.zip |
Fixed SFTP storage to overwrite on rename
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/lib/sftp.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php index bcc4c5eafd5..95e0cefa398 100644 --- a/apps/files_external/lib/sftp.php +++ b/apps/files_external/lib/sftp.php @@ -285,6 +285,9 @@ class SFTP extends \OC\Files\Storage\Common { public function rename($source, $target) { try { + if (!$this->is_dir($target) && $this->file_exists($target)) { + $this->unlink($target); + } return $this->client->rename( $this->absPath($source), $this->absPath($target) |