Skip to content

Commit

Permalink
fix: StatCacheProxy get
Browse files Browse the repository at this point in the history
  • Loading branch information
Feichtmeier committed Oct 29, 2024
1 parent 577d9e7 commit e56ab06
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/backend/fetch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 6 additions & 3 deletions lib/backend/stat_cache_proxy.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:async';

import 'package:files/backend/database/model.dart';
import 'package:files/backend/providers.dart';

Expand All @@ -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;
}
}

0 comments on commit e56ab06

Please sign in to comment.