Gracefull handle link shares rename hook
Fixes #21678 The hook is called on all renames. However when we use a link share the getUserFolder fails. We now just opt out.
This commit is contained in:
parent
7dde2c773f
commit
f4edfb6dfb
|
@ -73,6 +73,12 @@ class Shared_Updater {
|
||||||
*/
|
*/
|
||||||
static private function moveShareToShare($path) {
|
static private function moveShareToShare($path) {
|
||||||
$userFolder = \OC::$server->getUserFolder();
|
$userFolder = \OC::$server->getUserFolder();
|
||||||
|
|
||||||
|
// If the user folder can't be constructed (e.g. link share) just return.
|
||||||
|
if ($userFolder === null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$src = $userFolder->get($path);
|
$src = $userFolder->get($path);
|
||||||
|
|
||||||
$type = $src instanceof \OCP\Files\File ? 'file' : 'folder';
|
$type = $src instanceof \OCP\Files\File ? 'file' : 'folder';
|
||||||
|
|
Loading…
Reference in New Issue