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 susnux committed Jan 17, 2025
1 parent 0074806 commit 57f4126
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 @@ -1186,7 +1186,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 @@ -1199,6 +1199,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 57f4126

Please sign in to comment.