File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -249,14 +249,14 @@ public function insert($file, array $data) {
249249 $ file = $ this ->normalize ($ file );
250250
251251 if (isset ($ this ->partial [$ file ])) { //add any saved partial data
252- $ data = array_merge ($ this ->partial [$ file ], $ data );
252+ $ data = array_merge ($ this ->partial [$ file ]-> getData () , $ data );
253253 unset($ this ->partial [$ file ]);
254254 }
255255
256256 $ requiredFields = ['size ' , 'mtime ' , 'mimetype ' ];
257257 foreach ($ requiredFields as $ field ) {
258258 if (!isset ($ data [$ field ])) { //data not complete save as partial and return
259- $ this ->partial [$ file ] = $ data ;
259+ $ this ->partial [$ file ] = new CacheEntry ( $ data) ;
260260 return -1 ;
261261 }
262262 }
Original file line number Diff line number Diff line change 88namespace Test \Files \Cache ;
99
1010use OC \Files \Cache \Cache ;
11+ use OC \Files \Cache \CacheEntry ;
1112use OC \Files \Search \SearchComparison ;
1213use OC \Files \Search \SearchQuery ;
1314use OCP \EventDispatcher \IEventDispatcher ;
@@ -127,13 +128,13 @@ public function testPartial(): void {
127128 $ file1 = 'foo ' ;
128129
129130 $ this ->cache ->put ($ file1 , ['size ' => 10 ]);
130- $ this ->assertEquals (['size ' => 10 ], $ this ->cache ->get ($ file1 ));
131+ $ this ->assertEquals (new CacheEntry ( ['size ' => 10 ]) , $ this ->cache ->get ($ file1 ));
131132
132133 $ this ->cache ->put ($ file1 , ['mtime ' => 15 ]);
133- $ this ->assertEquals (['size ' => 10 , 'mtime ' => 15 ], $ this ->cache ->get ($ file1 ));
134+ $ this ->assertEquals (new CacheEntry ( ['size ' => 10 , 'mtime ' => 15 ]) , $ this ->cache ->get ($ file1 ));
134135
135136 $ this ->cache ->put ($ file1 , ['size ' => 12 ]);
136- $ this ->assertEquals (['size ' => 12 , 'mtime ' => 15 ], $ this ->cache ->get ($ file1 ));
137+ $ this ->assertEquals (new CacheEntry ( ['size ' => 12 , 'mtime ' => 15 ]) , $ this ->cache ->get ($ file1 ));
137138 }
138139
139140 /**
You can’t perform that action at this time.
0 commit comments