mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Merge pull request #34035 from nextcloud/fix/do-not-log-warning-on-404
Do not output a warning when a file is not found
This commit is contained in:
commit
ee183efd46
1 changed files with 1 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue