Skip to content

Commit 8766c94

Browse files
committed
Merge #272 [fix 29] Make copy of shared file deletable
2 parents fbfe307 + 03e7ef3 commit 8766c94

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/private/Files/Cache/Cache.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ public static function cacheEntryFromData($data, IMimeTypeLoader $mimetypeLoader
202202
if ($data['storage_mtime'] == 0) {
203203
$data['storage_mtime'] = $data['mtime'];
204204
}
205+
if (isset($data['f_permissions'])) {
206+
$data['scan_permissions'] = $data['f_permissions'];
207+
}
205208
$data['permissions'] = (int)$data['permissions'];
206209
if (isset($data['creation_time'])) {
207210
$data['creation_time'] = (int)$data['creation_time'];
@@ -1190,7 +1193,7 @@ public function copyFromCache(ICache $sourceCache, ICacheEntry $sourceEntry, str
11901193
}
11911194

11921195
private function cacheEntryToArray(ICacheEntry $entry): array {
1193-
return [
1196+
$data = [
11941197
'size' => $entry->getSize(),
11951198
'mtime' => $entry->getMTime(),
11961199
'storage_mtime' => $entry->getStorageMTime(),
@@ -1203,6 +1206,10 @@ private function cacheEntryToArray(ICacheEntry $entry): array {
12031206
'upload_time' => $entry->getUploadTime(),
12041207
'metadata_etag' => $entry->getMetadataEtag(),
12051208
];
1209+
if ($entry instanceof CacheEntry && isset($entry['scan_permissions'])) {
1210+
$data['permissions'] = $entry['scan_permissions'];
1211+
}
1212+
return $data;
12061213
}
12071214

12081215
public function getQueryFilterForStorage(): ISearchOperator {

0 commit comments

Comments
 (0)