diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-08-06 18:05:28 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-08-06 18:05:28 +0200 |
commit | 4c9f55a325a227bdb71cf866e3b86cad07b34ea9 (patch) | |
tree | 539b61b83fa37c036af87e4ede2187aeb0ba6975 /apps/files_external/lib | |
parent | aeb4cdfb951b270a6074e85a06e509dd6400a744 (diff) | |
parent | db89d1cec8291b64f8a49574564c073c3a92b96a (diff) | |
download | nextcloud-server-4c9f55a325a227bdb71cf866e3b86cad07b34ea9.tar.gz nextcloud-server-4c9f55a325a227bdb71cf866e3b86cad07b34ea9.zip |
Merge pull request #17680 from owncloud/ftp-rmdir-file
handle rmdir on files for ftp storages
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r-- | apps/files_external/lib/streamwrapper.php | 5 |
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); |