Skip to content

Commit bdffd79

Browse files
Messj1miaulalala
authored andcommitted
log warnings to give admins more infos about possibly miscalculated activities.
Signed-off-by: Jan Messer <jan@mtec-studios.ch>
1 parent 4cc6701 commit bdffd79

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/FilesHooks.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,13 +578,17 @@ protected function getUserPathsFromPath($path, $uidOwner) {
578578
try {
579579
$node = $this->rootFolder->getUserFolder($uidOwner)->get($path);
580580
} catch (NotFoundException $e) {
581+
$this->logger->warning('Path "{path}" with owner "{uidOwner}" was not found',
582+
['path'=> $path, 'uidOwner'=>$uidOwner]);
581583
return [
582584
'users' => [],
583585
'remotes' => [],
584586
];
585587
}
586588

587589
if (!$node instanceof Node) {
590+
$this->logger->warning('Path "{path}" of "{uidOwner}" is not a valid type.',
591+
['path'=> $path, 'uidOwner'=>$uidOwner]);
588592
return [
589593
'users' => [],
590594
'remotes' => [],

0 commit comments

Comments
 (0)