diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-11-27 15:08:09 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-11-27 15:08:09 +0100 |
commit | 9fb71af98850ad6638c4238ae0938972a9f23b50 (patch) | |
tree | 52e081bc8577f78505ea80fc7158eb9235c7ed59 /apps/files_external/lib/sftp.php | |
parent | 6443e570c2793954309f9541cd6a7a8c309644ac (diff) | |
parent | 5b7b0536346a4a6608e0b294b6784ac5ff3b142a (diff) | |
download | nextcloud-server-9fb71af98850ad6638c4238ae0938972a9f23b50.tar.gz nextcloud-server-9fb71af98850ad6638c4238ae0938972a9f23b50.zip |
Merge branch 'master' into encryption_enable_public_upload
Conflicts:
apps/files_encryption/lib/helper.php
apps/files_encryption/lib/keymanager.php
apps/files_encryption/lib/stream.php
apps/files_encryption/lib/util.php
apps/files_encryption/tests/keymanager.php
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) |