summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-07-16 15:44:10 +0200
committerRobin Appelman <icewind@owncloud.com>2015-07-16 15:44:10 +0200
commitdb89d1cec8291b64f8a49574564c073c3a92b96a (patch)
treed66ab75820055d6b31d803be42c467e02af6f58a /apps
parent15877ac7eba002df64493b036191759e939b16e9 (diff)
downloadnextcloud-server-db89d1cec8291b64f8a49574564c073c3a92b96a.tar.gz
nextcloud-server-db89d1cec8291b64f8a49574564c073c3a92b96a.zip
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 f2438a5487b..387667a81a9 100644
--- a/apps/files_external/lib/streamwrapper.php
+++ b/apps/files_external/lib/streamwrapper.php
@@ -40,8 +40,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);