diff options
Diffstat (limited to 'apps/files_external/lib/sftp.php')
-rw-r--r-- | apps/files_external/lib/sftp.php | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php index 7c5aed5aa06..95e0cefa398 100644 --- a/apps/files_external/lib/sftp.php +++ b/apps/files_external/lib/sftp.php @@ -180,14 +180,6 @@ class SFTP extends \OC\Files\Storage\Common { return false; } - public function isReadable($path) { - return true; - } - - public function isUpdatable($path) { - return true; - } - public function file_exists($path) { try { return $this->client->stat($this->absPath($path)) !== false; @@ -293,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) |