Skip to content

Commit

Permalink
[BUGFIX] Don't stop indexing if a folder does not exist, fixes #225
Browse files Browse the repository at this point in the history
Don't throw an exception when
a folder has been configured to be
indexed in the file indexer does
not exist. Instead log the error
and continue indexing.
  • Loading branch information
christianbltr committed May 10, 2024
1 parent 448a464 commit 4dd6fc5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ ChangeLog

Upcoming version
[FEATURE] Add pagination in the backend module "Indexed content" function and avoid out of memory error. https://github.com/tpwd/ke_search/issues/100
[TASK] Add BEGIN and COMMIT statements needed to run ke_search in a Percona-Database-Cluster with strict-mode. Thanks to rentz-skygate. https://github.com/tpwd/ke_search/issues/222
[BUGFIX] Render file preview in result list only for files which are in the "imagefile_ext" list (images and PDF files). https://github.com/tpwd/ke_search/issues/60
[BUGFIX] Don't stop indexing if a folder does not exist. Thanks to Philip Hartmann. https://github.com/tpwd/ke_search/issues/225
[TASK] Add BEGIN and COMMIT statements needed to run ke_search in a Percona-Database-Cluster with strict-mode. Thanks to rentz-skygate. https://github.com/tpwd/ke_search/issues/222
[TASK] Improve logging for Indexer database actions and output errors in indexing report. https://github.com/tpwd/ke_search/issues/59

Version 5.4.1, 19 April 2024
Expand Down
8 changes: 8 additions & 0 deletions Classes/Indexer/Types/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ public function removeDeleted(): string
public function getFilesFromFal(array &$files, array $directoryArray)
{
foreach ($directoryArray as $directory) {
if (!$this->storage->hasFolder($directory)) {
$errorMessage = 'Folder "' . $directory . '" does not exist.';
// @extensionScannerIgnoreLine
$this->pObj->logger->error($errorMessage);
$this->addError($errorMessage);
continue;
}

/** @var Folder $folder */
$folder = $this->storage->getFolder($directory);

Expand Down

0 comments on commit 4dd6fc5

Please sign in to comment.