From ee0fec03857bd654bc496b2476a3e3fc02c9a40b Mon Sep 17 00:00:00 2001 From: DGoiana Date: Fri, 8 Mar 2024 20:08:11 +0000 Subject: [PATCH] Removing unecessary cast --- uni/lib/controller/cleanup.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uni/lib/controller/cleanup.dart b/uni/lib/controller/cleanup.dart index bcdce1335..c30d4a2b5 100644 --- a/uni/lib/controller/cleanup.dart +++ b/uni/lib/controller/cleanup.dart @@ -59,7 +59,7 @@ Future cleanDirectory(Directory directory, DateTime threshold) async { final entities = directory.listSync(recursive: true, followLinks: false); final toDeleteEntities = entities.whereType().where((file) { try { - final fileDate = File(file.path).lastModifiedSync(); + final fileDate = file.lastModifiedSync(); return fileDate.isBefore(threshold) && path.extension(file.path) != '.db'; } catch (e) { return false;