Fixed SFTP storage to overwrite on rename

This commit is contained in:
Vincent Petry 2013-11-26 16:32:44 +01:00
parent 2653d914d9
commit 30e086fb53
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)