diff options
author | Max <max@nextcloud.com> | 2023-09-19 10:54:48 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2023-10-18 14:31:27 +0200 |
commit | be373fca3cb8191ceefb77e05cc93e8c0050549d (patch) | |
tree | cb6157e23ce0e87c8f863b134012d0325b121da3 /apps/files_sharing/lib/Cache.php | |
parent | bb912ad47c34e99095477eec9943fe0ec21680b8 (diff) | |
download | nextcloud-server-be373fca3cb8191ceefb77e05cc93e8c0050549d.tar.gz nextcloud-server-be373fca3cb8191ceefb77e05cc93e8c0050549d.zip |
fix(sharing): set name to target name in sharing cache
Fixes #39879.
Signed-off-by: Max <max@nextcloud.com>
Diffstat (limited to 'apps/files_sharing/lib/Cache.php')
-rw-r--r-- | apps/files_sharing/lib/Cache.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Cache.php b/apps/files_sharing/lib/Cache.php index 594660661ca..af8e722c609 100644 --- a/apps/files_sharing/lib/Cache.php +++ b/apps/files_sharing/lib/Cache.php @@ -162,6 +162,10 @@ class Cache extends CacheJail { } else { $entry['permissions'] = $this->storage->getPermissions($entry['path']); } + + if ($this->share->getNodeId() === $entry['fileid']) { + $entry['name'] = basename($this->share->getTarget()); + } } catch (StorageNotAvailableException $e) { // thrown by FailedStorage e.g. when the sharer does not exist anymore // (IDE may say the exception is never thrown – false negative) |