diff options
author | Robin Appelman <robin@icewind.nl> | 2024-12-04 20:11:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-04 20:11:41 +0100 |
commit | c2f474ff4975bfac6671e2f9c912be97b1e1d633 (patch) | |
tree | cd9a561b59a3eb454612bd1a23d84aa372228cc3 /lib | |
parent | b4c43bb811407aeaf70f6df6cd1674eb27eaa734 (diff) | |
parent | e59ebafc877ef5e02f88915eeb0b30c91156e242 (diff) | |
download | nextcloud-server-c2f474ff4975bfac6671e2f9c912be97b1e1d633.tar.gz nextcloud-server-c2f474ff4975bfac6671e2f9c912be97b1e1d633.zip |
Merge pull request #48769 from nextcloud/copy-share-unmasked
Fix incorrect permissions when copying shared files
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Cache/Cache.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index da798af46cd..cb841755efd 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -168,6 +168,9 @@ class Cache implements ICache { if ($data['storage_mtime'] == 0) { $data['storage_mtime'] = $data['mtime']; } + if (isset($data['f_permissions'])) { + $data['scan_permissions'] = $data['f_permissions']; + } $data['permissions'] = (int)$data['permissions']; if (isset($data['creation_time'])) { $data['creation_time'] = (int)$data['creation_time']; @@ -1183,7 +1186,7 @@ class Cache implements ICache { } private function cacheEntryToArray(ICacheEntry $entry): array { - return [ + $data = [ 'size' => $entry->getSize(), 'mtime' => $entry->getMTime(), 'storage_mtime' => $entry->getStorageMTime(), @@ -1196,6 +1199,10 @@ class Cache implements ICache { 'upload_time' => $entry->getUploadTime(), 'metadata_etag' => $entry->getMetadataEtag(), ]; + if ($entry instanceof CacheEntry && isset($entry['scan_permissions'])) { + $data['permissions'] = $entry['scan_permissions']; + } + return $data; } public function getQueryFilterForStorage(): ISearchOperator { |