@@ -226,28 +226,8 @@ public function testCopyBetweenJails() {
226226 $ this ->assertEquals ('3 ' , $ this ->instance ->file_get_contents ('b/target/sub/3.txt ' ));
227227 }
228228
229- public function testCopyPreservesPermissions () {
230- $ cache = $ this ->instance ->getCache ();
231-
232- $ this ->instance ->file_put_contents ('test.txt ' , 'foo ' );
233- $ this ->assertTrue ($ cache ->inCache ('test.txt ' ));
234-
235- $ cache ->update ($ cache ->getId ('test.txt ' ), ['permissions ' => \OCP \Constants::PERMISSION_READ ]);
236- $ this ->assertEquals (\OCP \Constants::PERMISSION_READ , $ this ->instance ->getPermissions ('test.txt ' ));
237-
238- $ this ->assertTrue ($ this ->instance ->copy ('test.txt ' , 'new.txt ' ));
239-
240- $ this ->assertTrue ($ cache ->inCache ('new.txt ' ));
241- $ this ->assertEquals (\OCP \Constants::PERMISSION_READ , $ this ->instance ->getPermissions ('new.txt ' ));
242- }
243-
244- /**
245- * Test that copying files will drop permissions like local storage does
246- * TODO: Drop this and fix local storage
247- */
248229 public function testCopyGrantsPermissions () {
249230 $ config ['objectstore ' ] = $ this ->objectStorage ;
250- $ config ['handleCopiesAsOwned ' ] = true ;
251231 $ instance = new ObjectStoreStorageOverwrite ($ config );
252232
253233 $ cache = $ instance ->getCache ();
@@ -261,7 +241,7 @@ public function testCopyGrantsPermissions() {
261241 $ this ->assertTrue ($ instance ->copy ('test.txt ' , 'new.txt ' ));
262242
263243 $ this ->assertTrue ($ cache ->inCache ('new.txt ' ));
264- $ this ->assertEquals (\OCP \Constants::PERMISSION_ALL , $ instance ->getPermissions ('new.txt ' ));
244+ $ this ->assertEquals (\OCP \Constants::PERMISSION_ALL - \ OCP \Constants:: PERMISSION_CREATE , $ instance ->getPermissions ('new.txt ' ));
265245 }
266246
267247 public function testCopyFolderSize (): void {
0 commit comments