From 025c85c1aa93b00d684a94a157065467bf2b3ebc Mon Sep 17 00:00:00 2001 From: benbierens Date: Wed, 27 Nov 2024 10:30:30 +0100 Subject: [PATCH] fixes file-backed worker issue --- Tools/AutoClient/Modes/FolderStore/FileWorker.cs | 8 ++++---- Tools/AutoClient/Modes/FolderStore/JsonBacked.cs | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Tools/AutoClient/Modes/FolderStore/FileWorker.cs b/Tools/AutoClient/Modes/FolderStore/FileWorker.cs index 37e52bd..94a67f0 100644 --- a/Tools/AutoClient/Modes/FolderStore/FileWorker.cs +++ b/Tools/AutoClient/Modes/FolderStore/FileWorker.cs @@ -13,14 +13,14 @@ namespace AutoClient.Modes.FolderStore private readonly Action onNewPurchase; private readonly CodexNode codex; - public FileWorker(App app, ICodexInstance instance, PurchaseInfo purchaseInfo, string folder, FileIndex filename, Action onFileUploaded, Action onNewPurchase) - : base(app, folder, filename + ".json", purchaseInfo) + public FileWorker(App app, ICodexInstance instance, PurchaseInfo purchaseInfo, string folder, FileIndex fileIndex, Action onFileUploaded, Action onNewPurchase) + : base(app, folder, fileIndex.File + ".json", purchaseInfo) { this.app = app; - log = new LogPrefixer(app.Log, GetFileTag(filename)); + log = new LogPrefixer(app.Log, GetFileTag(fileIndex)); this.instance = instance; this.purchaseInfo = purchaseInfo; - sourceFilename = filename.File; + sourceFilename = fileIndex.File; if (sourceFilename.ToLowerInvariant().EndsWith(".json")) throw new Exception("Not an era file."); this.onFileUploaded = onFileUploaded; this.onNewPurchase = onNewPurchase; diff --git a/Tools/AutoClient/Modes/FolderStore/JsonBacked.cs b/Tools/AutoClient/Modes/FolderStore/JsonBacked.cs index a9be798..d00581a 100644 --- a/Tools/AutoClient/Modes/FolderStore/JsonBacked.cs +++ b/Tools/AutoClient/Modes/FolderStore/JsonBacked.cs @@ -12,8 +12,6 @@ namespace AutoClient.Modes.FolderStore Folder = folder; FilePath = filePath; LoadState(); - - app.Log.Debug("Deserialized state: " + JsonConvert.SerializeObject(State)); } private void LoadState()