File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
lib/private/Files/ObjectStore Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -431,17 +431,18 @@ public function touch($path, $mtime = null) {
431431 $ stat ['mtime ' ] = $ mtime ;
432432 $ this ->getCache ()->update ($ stat ['fileid ' ], $ stat );
433433 } else {
434- $ mimeType = \OC ::$ server ->getMimeTypeDetector ()->detectPath ($ path );
435- // create new file
436- $ stat = [
437- 'etag ' => $ this ->getETag ($ path ),
438- 'mimetype ' => $ mimeType ,
439- 'size ' => 0 ,
440- 'mtime ' => $ mtime ,
441- 'storage_mtime ' => $ mtime ,
442- 'permissions ' => \OCP \Constants::PERMISSION_ALL - \OCP \Constants::PERMISSION_CREATE ,
443- ];
444434 if (!isset ($ this ->movingBetweenBuckets [$ this ->getBucket ()]['paths ' ][$ path ])) {
435+ $ mimeType = \OC ::$ server ->getMimeTypeDetector ()->detectPath ($ path );
436+ // create new file
437+ $ stat = [
438+ 'etag ' => $ this ->getETag ($ path ),
439+ 'mimetype ' => $ mimeType ,
440+ 'size ' => 0 ,
441+ 'mtime ' => $ mtime ,
442+ 'storage_mtime ' => $ mtime ,
443+ 'permissions ' => \OCP \Constants::PERMISSION_ALL - \OCP \Constants::PERMISSION_CREATE ,
444+ ];
445+
445446 $ fileId = $ this ->getCache ()->put ($ path , $ stat );
446447 try {
447448 //read an empty file from memory
You can’t perform that action at this time.
0 commit comments