diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-07-01 17:24:57 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-07-20 15:12:27 +0200 |
commit | d372836efc50ef6d048da618e633637c69e1bec2 (patch) | |
tree | cdbcde6833405bf573922fc0cbc1fe62c3705986 /apps | |
parent | b37e1ed17f54916e3321427d92afa3f74ebea1b3 (diff) | |
download | nextcloud-server-d372836efc50ef6d048da618e633637c69e1bec2.tar.gz nextcloud-server-d372836efc50ef6d048da618e633637c69e1bec2.zip |
Fix overwriting folders on rename with SFTP
This aligns the behavior with other storages and also fixes the failing
unit test testRenameOverWriteDirectory
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SFTP.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index 3be7a801229..4d4fe6945aa 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -426,7 +426,7 @@ class SFTP extends \OC\Files\Storage\Common { */ public function rename($source, $target) { try { - if (!$this->is_dir($target) && $this->file_exists($target)) { + if ($this->file_exists($target)) { $this->unlink($target); } return $this->getConnection()->rename( |