aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-03-09 16:44:57 +0100
committerRobin Appelman <icewind@owncloud.com>2016-03-11 13:15:45 +0100
commit3bd6fc797dd5635f3881f303f3b475af636373a7 (patch)
tree0bcdfdd9fa7103535a0cd37dcafaa0b0088a5439 /apps/files_external
parent750ec93394b76a3af4d45b32fd3b4dd788d431cf (diff)
downloadnextcloud-server-3bd6fc797dd5635f3881f303f3b475af636373a7.tar.gz
nextcloud-server-3bd6fc797dd5635f3881f303f3b475af636373a7.zip
dont break when there is an invalid share
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/failedcache.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/files_external/lib/failedcache.php b/apps/files_external/lib/failedcache.php
index 0f59495e595..2fddb3eca89 100644
--- a/apps/files_external/lib/failedcache.php
+++ b/apps/files_external/lib/failedcache.php
@@ -29,6 +29,17 @@ use OCP\Files\Cache\ICache;
* Storage placeholder to represent a missing precondition, storage unavailable
*/
class FailedCache implements ICache {
+ private $visible;
+
+ /**
+ * FailedCache constructor.
+ *
+ * @param bool $visible
+ */
+ public function __construct($visible = true) {
+ $this->visible = $visible;
+ }
+
public function getNumericStorageId() {
return -1;
@@ -41,7 +52,7 @@ class FailedCache implements ICache {
'size' => 0,
'mimetype' => 'httpd/unix-directory',
'mimepart' => 'httpd',
- 'permissions' => Constants::PERMISSION_READ,
+ 'permissions' => $this->visible ? Constants::PERMISSION_READ : 0,
'mtime' => time()
]);
} else {