Skip to content

Commit

Permalink
fix: go ahead if the file is not found
Browse files Browse the repository at this point in the history
Maybe the file was deleted and at this moment we don't want to receive
an error if the file was not found

Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos authored and backportbot-libresign[bot] committed Nov 15, 2024
1 parent f9cd75b commit 55bd7d0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/Service/FileService.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use OCP\AppFramework\Services\IAppConfig;
use OCP\Files\IMimeTypeDetector;
use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
use OCP\Http\Client\IClientService;
use OCP\IDateTimeFormatter;
use OCP\IL10N;
Expand Down Expand Up @@ -604,7 +605,10 @@ public function delete(int $fileId): void {
$signedNextcloudFile = $this->folderService->getFileById($file->getSignedNodeId());
$signedNextcloudFile->delete();
}
$nextcloudFile = $this->folderService->getFileById($fileId);
$nextcloudFile->delete();
try {
$nextcloudFile = $this->folderService->getFileById($fileId);
$nextcloudFile->delete();
} catch (NotFoundException $e) {
}
}
}

0 comments on commit 55bd7d0

Please sign in to comment.