]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix getting the access list on external storage 14747/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Tue, 19 Mar 2019 14:38:52 +0000 (15:38 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Tue, 19 Mar 2019 14:38:52 +0000 (15:38 +0100)
If a file is on external storage there is no owner. WHich means we can't
check. So just return an empty array then.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
lib/private/Share20/Manager.php

index d253d6bae4c897630a2aba235f9654434a53ab04..38be97746f42c75715daef4e0a6d3f01434a5026 100644 (file)
@@ -1408,7 +1408,13 @@ class Manager implements IManager {
         * @return array
         */
        public function getAccessList(\OCP\Files\Node $path, $recursive = true, $currentAccess = false) {
-               $owner = $path->getOwner()->getUID();
+               $owner = $path->getOwner();
+
+               if ($owner === null) {
+                       return [];
+               }
+
+               $owner = $owner->getUID();
 
                if ($currentAccess) {
                        $al = ['users' => [], 'remote' => [], 'public' => false];