From 7bbf2199aef336e62c7c60be14dabd528766d4a0 Mon Sep 17 00:00:00 2001 From: Dylan <41908416+ErrorDodo@users.noreply.github.com> Date: Mon, 9 Dec 2024 09:26:52 +0800 Subject: [PATCH] Fix issues with mods auto deleting --- .../Services/PenumbraInstallerService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PenumbraModForwarder.Common/Services/PenumbraInstallerService.cs b/PenumbraModForwarder.Common/Services/PenumbraInstallerService.cs index f0ba921..1e36bbf 100644 --- a/PenumbraModForwarder.Common/Services/PenumbraInstallerService.cs +++ b/PenumbraModForwarder.Common/Services/PenumbraInstallerService.cs @@ -116,8 +116,10 @@ private string ConvertToDt(string modPath) _logger.LogInformation($"Mod converted to DT: {dtPath}"); _systemTrayManager.ShowNotification("Mod Conversion", $"Mod converted to DT: {Path.GetFileName(modPath)}"); + + if (!_configurationService.GetConfigValue(config => config.AutoDelete)) return dtPath; - File.Delete(modPath); + File.Delete(dtPath); _logger.LogInformation($"Deleted original mod: {modPath}"); return dtPath;