Quellcode durchsuchen

Do not log locked files

This is the code doing its job. There is no need to spam the log file
with this.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tags/v17.0.0beta1
Roeland Jago Douma vor 4 Jahren
Ursprung
Commit
22f9a95814
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
1 geänderte Dateien mit 8 neuen und 1 gelöschten Zeilen
  1. 8
    1
      apps/dav/lib/Connector/Sabre/File.php

+ 8
- 1
apps/dav/lib/Connector/Sabre/File.php Datei anzeigen

@@ -55,6 +55,7 @@ use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\Files\Storage;
use OCP\Files\StorageNotAvailableException;
use OCP\ILogger;
use OCP\Lock\ILockingProvider;
use OCP\Lock\LockedException;
use OCP\Share\IManager;
@@ -229,7 +230,13 @@ class File extends Node implements IFile {
}

} catch (\Exception $e) {
\OC::$server->getLogger()->logException($e);
$context = [];

if ($e instanceof LockedException) {
$context['level'] = ILogger::DEBUG;
}

\OC::$server->getLogger()->logException($e, $context);
if ($needsPartFile) {
$partStorage->unlink($internalPartPath);
}

Laden…
Abbrechen
Speichern