]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not log FileLock as exception
authorRoeland Jago Douma <roeland@famdouma.nl>
Fri, 2 Nov 2018 21:06:25 +0000 (22:06 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Tue, 6 Nov 2018 07:07:07 +0000 (08:07 +0100)
There is no reason to log FileLock errors as exceptions to the log file.
Locks happen for very legit reasons and it is actually a sign of the
code doing its job.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php

index ecfd0e5692dd401831fb37743ced713d343c0728..d134a0efaffa0b1cb81e0b50c84682e172744bfd 100644 (file)
@@ -26,6 +26,7 @@
 
 namespace OCA\DAV\Connector\Sabre;
 
+use OCA\DAV\Connector\Sabre\Exception\FileLocked;
 use OCA\DAV\Connector\Sabre\Exception\PasswordLoginForbidden;
 use OCP\Files\StorageNotAvailableException;
 use OCP\ILogger;
@@ -69,6 +70,8 @@ class ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin {
                // happens when a certain method is not allowed to be called
                // for example creating a folder that already exists
                MethodNotAllowed::class => true,
+               // A locked file is perfectly valid and can happen in various cases
+               FileLocked::class => true,
        ];
 
        /** @var string */