Skip to content
Snippets Groups Projects
Commit e2ca88af authored by Vincent Petry's avatar Vincent Petry
Browse files

Merge pull request #6066 from owncloud/extstorage-sftp-overwriteonrename

Fixed SFTP storage to overwrite on rename
parents fb7aa2f0 30e086fb
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment