Merge pull request #470 from nextcloud/sftp-renameoverwritedir

Fix overwriting folders on rename with SFTP
This commit is contained in:
Morris Jobke 2016-07-20 18:31:06 +02:00 committed by GitHub
commit e2abe70514
1 changed files with 1 additions and 1 deletions

View File

@ -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(