diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-11-26 09:01:41 -0800 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-11-26 09:01:41 -0800 |
commit | e2ca88af5ed5f57f8e4328221280c95973171039 (patch) | |
tree | 2d22fa64d2b6c0e3c5f9b8274053ccc31d9f37d3 /apps | |
parent | fb7aa2f0140907b47606cf63332f2160abffceb0 (diff) | |
parent | 30e086fb530c1c0d951fe58266cd5aed21fd91be (diff) | |
download | nextcloud-server-e2ca88af5ed5f57f8e4328221280c95973171039.tar.gz nextcloud-server-e2ca88af5ed5f57f8e4328221280c95973171039.zip |
Merge pull request #6066 from owncloud/extstorage-sftp-overwriteonrename
Fixed SFTP storage to overwrite on rename
Diffstat (limited to 'apps')
-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) |