chore: Use an if/else instead of the try/catch to make meaning more obvious

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/53276/head
Côme Chilliet 2025-06-17 16:25:45 +07:00
parent 7f1fb65549
commit 15c8b5ac58
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A
1 changed files with 3 additions and 2 deletions

@ -12,6 +12,7 @@ use OC\DB\Exceptions\DbalException;
use OC\Files\Filesystem;
use OC\Files\Mount\MoveableMount;
use OC\Files\Node\NonExistingFile;
use OC\Files\Node\NonExistingFolder;
use OC\Files\View;
use OCA\Files_Versions\Storage;
use OCA\Files_Versions\Versions\INeedSyncVersionBackend;
@ -402,7 +403,7 @@ class FileEventsListener implements IEventListener {
}
}
try {
if (!($node instanceof NonExistingFile) && !($node instanceof NonExistingFolder)) {
$this->logger->debug('Failed to compute path for node', [
'node' => [
'path' => $node->getPath(),
@ -412,7 +413,7 @@ class FileEventsListener implements IEventListener {
'mtime' => $node->getMTime(),
]
]);
} catch (NotFoundException) {
} else {
$this->logger->debug('Failed to compute path for node', [
'node' => [
'path' => $node->getPath(),