From 8ab4f7a34bf50fb62bb116655da61458b4824a24 Mon Sep 17 00:00:00 2001 From: nyne Date: Sun, 9 Feb 2025 11:38:19 +0800 Subject: [PATCH] Fix the issue where cache files are not deleted. --- lib/utils/data_sync.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/utils/data_sync.dart b/lib/utils/data_sync.dart index 7f6aebf..4ee6435 100644 --- a/lib/utils/data_sync.dart +++ b/lib/utils/data_sync.dart @@ -118,6 +118,7 @@ class DataSync with ChangeNotifier { await client.remove(files.first.name!); } await client.write(filename, await data.readAsBytes()); + data.deleteIgnoreError(); Log.info("Upload Data", "Data uploaded successfully"); return const Res(true); } catch (e, s) {