From: Robin Appelman Date: Wed, 20 Jun 2012 09:35:45 +0000 (+0200) Subject: don't show other users file if the filesystem is not index already X-Git-Tag: v4.0.3~39 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c4d1363419eacf4ae805a65e43f43aef2a06be61;p=nextcloud-server.git don't show other users file if the filesystem is not index already --- diff --git a/lib/filecache.php b/lib/filecache.php index cef1ea04729..f93430fc9b0 100644 --- a/lib/filecache.php +++ b/lib/filecache.php @@ -266,6 +266,9 @@ class OC_FileCache{ } $path=$root.$path; $parent=self::getFileId($path); + if($path==-1){ + return array(); + } $query=OC_DB::prepare('SELECT name,ctime,mtime,mimetype,size,encrypted,versioned,writable FROM *PREFIX*fscache WHERE parent=? AND (mimetype LIKE ? OR mimetype = ?)'); $result=$query->execute(array($parent, $mimetype_filter.'%', 'httpd/unix-directory'))->fetchAll(); if(is_array($result)){