From d372836efc50ef6d048da618e633637c69e1bec2 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Fri, 1 Jul 2016 17:24:57 +0200 Subject: Fix overwriting folders on rename with SFTP This aligns the behavior with other storages and also fixes the failing unit test testRenameOverWriteDirectory --- apps/files_external/lib/Lib/Storage/SFTP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps') 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( -- cgit v1.2.3