aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2025-06-17 16:25:45 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2025-07-03 07:46:25 +0000
commitaf7e6c1598412c1efdc438eab23b951e733f6508 (patch)
tree62ec0ad2f8dbc69730f4dfed1af2a3e4aae2e547
parent774928bcbe060355f6dfe6003cdb741f5f367d3c (diff)
downloadnextcloud-server-backport/53276/stable30.tar.gz
nextcloud-server-backport/53276/stable30.zip
chore: Use an if/else instead of the try/catch to make meaning more obviousbackport/53276/stable30
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--apps/files_versions/lib/Listener/FileEventsListener.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_versions/lib/Listener/FileEventsListener.php b/apps/files_versions/lib/Listener/FileEventsListener.php
index e0db484cd94..d5c60dd9343 100644
--- a/apps/files_versions/lib/Listener/FileEventsListener.php
+++ b/apps/files_versions/lib/Listener/FileEventsListener.php
@@ -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;
@@ -443,7 +444,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(),
@@ -453,7 +454,7 @@ class FileEventsListener implements IEventListener {
'mtime' => $node->getMTime(),
]
]);
- } catch (NotFoundException) {
+ } else {
$this->logger->debug('Failed to compute path for node', [
'node' => [
'path' => $node->getPath(),