diff --git a/Dalamud/Plugin/PluginRepository.cs b/Dalamud/Plugin/PluginRepository.cs index 0f386b1d1..af8ff3326 100644 --- a/Dalamud/Plugin/PluginRepository.cs +++ b/Dalamud/Plugin/PluginRepository.cs @@ -142,11 +142,6 @@ namespace Dalamud.Plugin // DisablePlugin() below immediately creates a .disabled file anyway, but will fail // with an exception if we try to do it twice in row like this - // TODO: not sure if doing this for all versions is really necessary, since the - // others really needed to be disabled before anyway - //foreach (var sortedVersion in sortedVersions) { - // File.Create(Path.Combine(sortedVersion.FullName, ".disabled")); - //} if (!dryRun) { @@ -161,6 +156,18 @@ namespace Dalamud.Plugin hasError = true; } + try { + // Just to be safe + foreach (var sortedVersion in sortedVersions) + { + var disabledFile = new FileInfo(Path.Combine(sortedVersion.FullName, ".disabled")); + if (!disabledFile.Exists) + disabledFile.Create(); + } + } catch (Exception ex) { + Log.Error(ex, "Plugin disable failed"); + } + var installSuccess = InstallPlugin(remoteInfo); if (installSuccess)