Merge pull request #19980 from owncloud/fix-deleted-ldap-user-sharing
handle NoUserException in sharing code
This commit is contained in:
commit
7b5db9085d
|
@ -32,6 +32,7 @@
|
|||
|
||||
namespace OC\Files\Cache;
|
||||
|
||||
use OC\User\NoUserException;
|
||||
use OCP\Share_Backend_Collection;
|
||||
|
||||
/**
|
||||
|
@ -64,7 +65,12 @@ class Shared_Cache extends Cache {
|
|||
}
|
||||
$source = \OC_Share_Backend_File::getSource($target, $this->storage->getShare());
|
||||
if (isset($source['path']) && isset($source['fileOwner'])) {
|
||||
\OC\Files\Filesystem::initMountPoints($source['fileOwner']);
|
||||
try {
|
||||
\OC\Files\Filesystem::initMountPoints($source['fileOwner']);
|
||||
} catch(NoUserException $e) {
|
||||
\OC::$server->getLogger()->logException($e, ['app' => 'files_sharing']);
|
||||
return false;
|
||||
}
|
||||
$mounts = \OC\Files\Filesystem::getMountByNumericId($source['storage']);
|
||||
if (is_array($mounts) and !empty($mounts)) {
|
||||
$fullPath = $mounts[0]->getMountPoint() . $source['path'];
|
||||
|
|
Loading…
Reference in New Issue