diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-09-12 16:04:02 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-09-12 16:04:02 +0200 |
commit | b5ccece5a9630740519b7ae4221fd7c0380e2876 (patch) | |
tree | 0fa45603ed1a62b41e33be081e014f31556a4cc5 | |
parent | 1f7e769ed6ce1e7fe6b093c0e77a3f281b8c8ad3 (diff) | |
download | nextcloud-server-b5ccece5a9630740519b7ae4221fd7c0380e2876.tar.gz nextcloud-server-b5ccece5a9630740519b7ae4221fd7c0380e2876.zip |
Do not output a warning when a file is not found
This would spam log with warnings from Desktop client doing HEAD on
non-existing path to test them.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | apps/dav/lib/DAV/ViewOnlyPlugin.php | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/apps/dav/lib/DAV/ViewOnlyPlugin.php b/apps/dav/lib/DAV/ViewOnlyPlugin.php index b4652da09e1..e0c4e26f598 100644 --- a/apps/dav/lib/DAV/ViewOnlyPlugin.php +++ b/apps/dav/lib/DAV/ViewOnlyPlugin.php @@ -23,8 +23,6 @@ namespace OCA\DAV\DAV; use OCA\DAV\Connector\Sabre\Exception\Forbidden; use OCA\DAV\Connector\Sabre\File as DavFile; -use OCA\DAV\Meta\MetaFile; -use OCP\Files\FileInfo; use OCP\Files\NotFoundException; use Psr\Log\LoggerInterface; use Sabre\DAV\Server; @@ -36,7 +34,6 @@ use Sabre\DAV\Exception\NotFound; * Sabre plugin for restricting file share receiver download: */ class ViewOnlyPlugin extends ServerPlugin { - private ?Server $server = null; private LoggerInterface $logger; @@ -99,9 +96,7 @@ class ViewOnlyPlugin extends ServerPlugin { throw new Forbidden('Access to this resource has been denied because it is in view-only mode.'); } } catch (NotFound $e) { - $this->logger->warning($e->getMessage(), [ - 'exception' => $e, - ]); + // File not found } return true; |