Merge pull request #6066 from owncloud/extstorage-sftp-overwriteonrename
Fixed SFTP storage to overwrite on rename
This commit is contained in:
commit
e2ca88af5e
|
@ -285,6 +285,9 @@ class SFTP extends \OC\Files\Storage\Common {
|
||||||
|
|
||||||
public function rename($source, $target) {
|
public function rename($source, $target) {
|
||||||
try {
|
try {
|
||||||
|
if (!$this->is_dir($target) && $this->file_exists($target)) {
|
||||||
|
$this->unlink($target);
|
||||||
|
}
|
||||||
return $this->client->rename(
|
return $this->client->rename(
|
||||||
$this->absPath($source),
|
$this->absPath($source),
|
||||||
$this->absPath($target)
|
$this->absPath($target)
|
||||||
|
|
Loading…
Reference in New Issue