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

Fixed SFTP storage to overwrite on rename
This commit is contained in:
Vincent Petry 2013-11-26 09:01:41 -08:00
commit e2ca88af5e
1 changed files with 3 additions and 0 deletions

View File

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