From bbb7e71e34b2be8b3ca6c55870fb445dedeb1afc Mon Sep 17 00:00:00 2001 From: Emerassi <78173681+Emerassi@users.noreply.github.com> Date: Tue, 29 Jul 2025 21:28:54 -0700 Subject: [PATCH] Update the last modified time on any data package file that is loaded from the cache to indicate that the file should not be deleted during data package cleanup. --- .../DataPackage/FileSystemCheckSumDataPackageProvider.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Archipelago.MultiClient.Net/DataPackage/FileSystemCheckSumDataPackageProvider.cs b/Archipelago.MultiClient.Net/DataPackage/FileSystemCheckSumDataPackageProvider.cs index d5a4111..32ba2a4 100644 --- a/Archipelago.MultiClient.Net/DataPackage/FileSystemCheckSumDataPackageProvider.cs +++ b/Archipelago.MultiClient.Net/DataPackage/FileSystemCheckSumDataPackageProvider.cs @@ -31,6 +31,11 @@ public bool TryGetDataPackage(string game, string checksum, out GameData gameDat { var fileText = File.ReadAllText(filePath); gameData = JsonConvert.DeserializeObject(fileText); + + // Updating the file's last modified time to let the automatic data package cleanup routine in CommonClient + // know this file was recently used + File.SetLastWriteTime(filePath, DateTime.Now); + return true; } catch