Skip to content

Commit

Permalink
fix: use scan_permissions when copying cache items
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 authored and solracsf committed Dec 9, 2024
1 parent fb71c41 commit cd86944
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/private/Files/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ public function copyFromCache(ICache $sourceCache, ICacheEntry $sourceEntry, str
}

private function cacheEntryToArray(ICacheEntry $entry): array {
return [
$data = [
'size' => $entry->getSize(),
'mtime' => $entry->getMTime(),
'storage_mtime' => $entry->getStorageMTime(),
Expand All @@ -1206,6 +1206,10 @@ private function cacheEntryToArray(ICacheEntry $entry): array {
'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 {
Expand Down

0 comments on commit cd86944

Please sign in to comment.