Skip to content

Commit

Permalink
Do not produce warning when file is not found during search
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubOnderka committed Oct 3, 2024
1 parent d1206e6 commit 2b12ace
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Service/SearchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

use ArtificialOwl\MySmallPhpTools\Traits\TPathTools;
use Exception;
use OCA\Files_FullTextSearch\Exceptions\FilesNotFoundException;
use OCA\Files_FullTextSearch\Model\FilesDocument;
use OCP\Files\FileInfo;
use OCP\Files\IMimeTypeDetector;
Expand Down Expand Up @@ -212,6 +213,8 @@ public function improveSearchResult(ISearchResult $searchResult) {
);

$filesDocuments[] = $filesDocument;
} catch (FilesNotFoundException $e) {
// ignore exception when file is not accessible for current user
} catch (Exception $e) {
$this->logger->warning('Exception while improving searchresult', ['exception' => $e]);
}
Expand Down

0 comments on commit 2b12ace

Please sign in to comment.