[Pkg-owncloud-commits] [owncloud] 31/79: handle rmdir on files for ftp storages

David Prévot taffit at moszumanska.debian.org
Tue Sep 1 20:55:36 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 6c8689072cde6df02131d7ed2486c1df25325732
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 f2438a5..387667a 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);

-- 
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