diff --git a/lib/backend/fetch.dart b/lib/backend/fetch.dart index 916499d..6275f08 100755 --- a/lib/backend/fetch.dart +++ b/lib/backend/fetch.dart @@ -104,8 +104,8 @@ class CancelableFsFetch { EntityInfo b, { bool isDirectory = false, }) { - var item1 = a; - var item2 = b; + EntityInfo item1 = a; + EntityInfo item2 = b; if (!ascending) { item2 = a; diff --git a/lib/backend/stat_cache_proxy.dart b/lib/backend/stat_cache_proxy.dart index b14c913..2ccffdf 100755 --- a/lib/backend/stat_cache_proxy.dart +++ b/lib/backend/stat_cache_proxy.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:files/backend/database/model.dart'; import 'package:files/backend/providers.dart'; @@ -13,8 +15,9 @@ class StatCacheProxy { return stat; } - // TODO(@HrX03): is this correct? - // ignore: unawaited_futures - return _runtimeCache[path]!..fetchUpdate(); + final runtimeCache = _runtimeCache[path]; + await runtimeCache!.fetchUpdate(); + + return runtimeCache; } }