summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-07-16 15:44:10 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-08-13 10:56:09 +0200
commitcb9aa372c89b8871bb3ad932b773e67aae77e239 (patch)
treebeb6f28c09681010231afa5fd66aecbda7f997de
parent30409c7419e78d5f736695f1d7bba94f97e42079 (diff)
downloadnextcloud-server-cb9aa372c89b8871bb3ad932b773e67aae77e239.tar.gz
nextcloud-server-cb9aa372c89b8871bb3ad932b773e67aae77e239.zip
handle rmdir on files for ftp storages
-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);