Skip to content

Commit

Permalink
Merge pull request #3971 from LibreSign/backport/3964/stable29
Browse files Browse the repository at this point in the history
[stable29] fix: go ahead if the file is not found
  • Loading branch information
vitormattos authored Nov 15, 2024
2 parents ecc0d1b + d0e4ec1 commit 66b5f98
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 @@ -39,6 +39,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 @@ -620,7 +621,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 66b5f98

Please sign in to comment.