Skip to content

Commit

Permalink
fix(sharing): set name to target name in sharing cache
Browse files Browse the repository at this point in the history
Fixes #39879.

Signed-off-by: Max <max@nextcloud.com>
  • Loading branch information
max-nextcloud committed Sep 19, 2023
1 parent cd7c3f0 commit 66d5697
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apps/files_sharing/lib/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ protected function formatCacheEntry($entry, $path = null) {
} else {
$entry['permissions'] = $this->storage->getPermissions($entry['path']);
}
$entry['name'] = basename($this->share->getTarget());
} catch (StorageNotAvailableException $e) {

This comment has been minimized.

Copy link
@max-nextcloud

max-nextcloud Sep 19, 2023

Author Contributor

I'm not sure if this exception can still be thrown in the try block.

@icewind1991 do we still need it?

This comment has been minimized.

Copy link
@icewind1991

icewind1991 Sep 19, 2023

Member

storage->getPermissions could fire it yes

This comment has been minimized.

Copy link
@max-nextcloud

max-nextcloud Sep 19, 2023

Author Contributor

thanks!

// thrown by FailedStorage e.g. when the sharer does not exist anymore
// (IDE may say the exception is never thrown – false negative)
Expand Down

0 comments on commit 66d5697

Please sign in to comment.