From 01917e70a28a4a9028417d1784ef7f2ab06869a7 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 23 Apr 2017 21:55:01 -0400 Subject: fix rare issue where installer crashes trying to delete a bundled mod from %appdata% (#266) --- release-notes.md | 1 + src/StardewModdingAPI.Installer/InteractiveInstaller.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/release-notes.md b/release-notes.md index e6ddb3db..fe55ed10 100644 --- a/release-notes.md +++ b/release-notes.md @@ -17,6 +17,7 @@ For players: * Added support for Stardew Valley 1.2 beta. * Added logic to rewrite many mods for compatibility with game updates, though some mods may still need an update. * Fixed some players getting `SEHException` errors. +* Fixed rare issue where the installer would crash trying to delete a bundled mod from `%appdata%`. For mod developers: * Fixed mouse-changed event never updating prior mouse position. diff --git a/src/StardewModdingAPI.Installer/InteractiveInstaller.cs b/src/StardewModdingAPI.Installer/InteractiveInstaller.cs index e1e62d89..c456fdc0 100644 --- a/src/StardewModdingAPI.Installer/InteractiveInstaller.cs +++ b/src/StardewModdingAPI.Installer/InteractiveInstaller.cs @@ -592,7 +592,7 @@ namespace StardewModdingApi.Installer if (isDir && packagedModNames.Contains(entry.Name, StringComparer.InvariantCultureIgnoreCase)) { this.PrintDebug($" Deleting {entry.Name} because it's bundled into SMAPI..."); - entry.Delete(); + this.InteractivelyDelete(entry.FullName); continue; } -- cgit