Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion lib/DAV/WorkspacePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace OCA\Text\DAV;

use Exception;
use OC\Files\Node\File;
use OCA\DAV\Connector\Sabre\Directory;
use OCA\DAV\Files\FilesHome;
Expand All @@ -20,6 +21,7 @@
use OCP\ICacheFactory;
use OCP\IConfig;
use OCP\Lock\LockedException;
use Psr\Log\LoggerInterface;
use Sabre\DAV\INode;
use Sabre\DAV\PropFind;
use Sabre\DAV\Server;
Expand All @@ -37,6 +39,7 @@ public function __construct(
private IRootFolder $rootFolder,
private ICacheFactory $cacheFactory,
private IConfig $config,
private LoggerInterface $logger,
private ?string $userId
) {
}
Expand Down Expand Up @@ -96,7 +99,12 @@ public function propFind(PropFind $propFind, INode $node) {
try {
$cachedContent = $file->getContent();
$cache->set($cacheKey, $cachedContent, 3600);
} catch (GenericFileException|NotPermittedException|LockedException $e) {
} catch (GenericFileException|NotPermittedException|LockedException) {
// Ignore
} catch (Exception $e) {
$this->logger->error($e->getMessage(), [
'exception' => $e,
]);
}
}
return $cachedContent;
Expand Down