[Pkg-owncloud-commits] [owncloud] 07/24: handle rmdir on files for ftp storages
David Prévot
taffit at moszumanska.debian.org
Wed Sep 2 13:30:15 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v8.0.7RC1
in repository owncloud.
commit cb9aa372c89b8871bb3ad932b773e67aae77e239
Author: Robin Appelman <icewind at owncloud.com>
Date: Thu Jul 16 15:44:10 2015 +0200
handle rmdir on files for ftp storages
---
apps/files_external/lib/streamwrapper.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php
index b55bcf9..1f314df 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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list