summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-07-20 18:31:06 +0200
committerGitHub <noreply@github.com>2016-07-20 18:31:06 +0200
commite2abe70514ef2c66e3b3d88fac0d6b367f3a345c (patch)
treec49b0ce01e7d166ca74ad76109f8b007eaac6dea /apps
parent7cdf6402ff9a0e07866ca8bcfcffd0e0897b646a (diff)
parentd372836efc50ef6d048da618e633637c69e1bec2 (diff)
downloadnextcloud-server-e2abe70514ef2c66e3b3d88fac0d6b367f3a345c.tar.gz
nextcloud-server-e2abe70514ef2c66e3b3d88fac0d6b367f3a345c.zip
Merge pull request #470 from nextcloud/sftp-renameoverwritedir
Fix overwriting folders on rename with SFTP
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/lib/Lib/Storage/SFTP.php2
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(