Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: Use an if/else instead of the try/catch to make meaning more o…
…bvious

Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc authored and backportbot[bot] committed Jul 3, 2025
commit af7e6c1598412c1efdc438eab23b951e733f6508
5 changes: 3 additions & 2 deletions apps/files_versions/lib/Listener/FileEventsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
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;
Expand Down Expand Up @@ -443,7 +444,7 @@ private function getPathForNode(Node $node): ?string {
}
}

try {
if (!($node instanceof NonExistingFile) && !($node instanceof NonExistingFolder)) {
$this->logger->debug('Failed to compute path for node', [
'node' => [
'path' => $node->getPath(),
Expand All @@ -453,7 +454,7 @@ private function getPathForNode(Node $node): ?string {
'mtime' => $node->getMTime(),
]
]);
} catch (NotFoundException) {
} else {
$this->logger->debug('Failed to compute path for node', [
'node' => [
'path' => $node->getPath(),
Expand Down
Loading