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 committed Jun 17, 2025
commit 15c8b5ac58add6e3d6ecf662dac5727e26bb6cc9
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 @@ -402,7 +403,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 @@ -412,7 +413,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