diff options
author | Max <max@nextcloud.com> | 2023-09-19 10:54:48 +0200 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2023-10-23 17:38:00 +0000 |
commit | 31978f447aec155549cad524179c47ec3334038a (patch) | |
tree | 02c1cf900a10417a74e04c34be421f8a8bb17613 /apps | |
parent | dc19882a7a88002bd539b2afecaf5a0fd8ac58cd (diff) | |
download | nextcloud-server-31978f447aec155549cad524179c47ec3334038a.tar.gz nextcloud-server-31978f447aec155549cad524179c47ec3334038a.zip |
fix(sharing): set name to target name in sharing cache
Fixes #39879.
Signed-off-by: Max <max@nextcloud.com>
Diffstat (limited to 'apps')
-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) |