Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-07-16 16:44:10 +0300
committerMorris Jobke <hey@morrisjobke.de>2015-08-13 11:56:09 +0300
commitcb9aa372c89b8871bb3ad932b773e67aae77e239 (patch)
treebeb6f28c09681010231afa5fd66aecbda7f997de /apps
parent30409c7419e78d5f736695f1d7bba94f97e42079 (diff)
handle rmdir on files for ftp storages
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/lib/streamwrapper.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php
index b55bcf94af8..1f314df1a48 100644
--- a/apps/files_external/lib/streamwrapper.php
+++ b/apps/files_external/lib/streamwrapper.php
@@ -21,8 +21,11 @@ abstract class StreamWrapper extends Common {
}
public function rmdir($path) {
- if ($this->file_exists($path) && $this->isDeletable($path)) {
+ if ($this->is_dir($path) && $this->isDeletable($path)) {
$dh = $this->opendir($path);
+ if (!is_resource($dh)) {
+ return false;
+ }
while (($file = readdir($dh)) !== false) {
if ($this->is_dir($path . '/' . $file)) {
$this->rmdir($path . '/' . $file);