Signed-off-by: Morris Jobke <hey@morrisjobke.de>
if ($mount) {
try {
$storage = $mount->getStorage();
- if ($storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
+ if ($storage && $storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
$storage->acquireLock(
$mount->getInternalPath($absolutePath),
$type,
if ($mount) {
try {
$storage = $mount->getStorage();
- if ($storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
+ if ($storage && $storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
$storage->changeLock(
$mount->getInternalPath($absolutePath),
$type,
if ($path->getId() !== $userFolder->getId() && !$userFolder->isSubNode($path)) {
$nodes = $userFolder->getById($path->getId());
$path = array_shift($nodes);
+ if ($path->getOwner() === null) {
+ return [];
+ }
$owner = $path->getOwner()->getUID();
}