mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
debug: log fileinfo on NotPermittedException
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
03ba092419
commit
96abf88e99
1 changed files with 7 additions and 0 deletions
|
|
@ -55,6 +55,13 @@ class File extends Node implements \OCP\Files\File {
|
|||
$this->fileInfo = null;
|
||||
$this->sendHooks(['postWrite']);
|
||||
} else {
|
||||
$fileInfo = $this->getFileInfo(false);
|
||||
$meta = [
|
||||
'id' => $fileInfo?->getId(),
|
||||
'data' => method_exists($fileInfo, 'getData') ? $fileInfo?->getData() : null,
|
||||
'owner' => $fileInfo?->getOwner(),
|
||||
];
|
||||
\OCP\Log\logger('debug')->error('NotPermittedException details: {data}', ['data' => $meta]);
|
||||
throw new NotPermittedException();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue