File tree Expand file tree Collapse file tree
apps/files_external/lib/Lib/Storage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -320,6 +320,22 @@ public function stat(string $path): array|false {
320320 return $ stat ;
321321 }
322322
323+ public function getMetaData (string $ path ): ?array {
324+ $ data = parent ::getMetaData ($ path );
325+ if ($ data !== null && $ data ['mimetype ' ] === FileInfo::MIMETYPE_FOLDER ) {
326+ // Common::getMetaData sets storage_mtime = mtime, but for S3 virtual directories
327+ // mtime may have been updated by mtime propagation while storage_mtime should
328+ // reflect the actual last storage change. Without this override the scanner sees
329+ // data['storage_mtime'] != cacheData['storage_mtime'] and re-writes the cache,
330+ // causing View::getCacheEntry to trigger propagateChange on every read.
331+ $ stat = $ this ->stat ($ path );
332+ if (isset ($ stat ['storage_mtime ' ])) {
333+ $ data ['storage_mtime ' ] = $ stat ['storage_mtime ' ];
334+ }
335+ }
336+ return $ data ;
337+ }
338+
323339 public function is_dir (string $ path ): bool {
324340 $ path = $ this ->normalizePath ($ path );
325341
You can’t perform that action at this time.
0 commit comments