diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-06-17 16:25:45 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2025-07-03 07:45:46 +0000 |
commit | 5e2569840b31d912d8594e9e3d338e7a80390e14 (patch) | |
tree | 02e036121f506ea9c6e9060bfff39385e35daa22 | |
parent | efd9991e21d6bc6377bcfc3b589372c0bd4c34eb (diff) | |
download | nextcloud-server-backport/53276/stable31.tar.gz nextcloud-server-backport/53276/stable31.zip |
chore: Use an if/else instead of the try/catch to make meaning more obviousbackport/53276/stable31
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | apps/files_versions/lib/Listener/FileEventsListener.php | 5 |
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 eaa12a261de..fd777067537 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; @@ -401,7 +402,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(), @@ -411,7 +412,7 @@ class FileEventsListener implements IEventListener { 'mtime' => $node->getMTime(), ] ]); - } catch (NotFoundException) { + } else { $this->logger->debug('Failed to compute path for node', [ 'node' => [ 'path' => $node->getPath(), |