mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-02 05:43:40 +01:00
fix: create all .disabled files for previous versions, just to be safe
This commit is contained in:
parent
fb42419b5d
commit
4d6f7762e6
1 changed files with 12 additions and 5 deletions
|
|
@ -142,11 +142,6 @@ namespace Dalamud.Plugin
|
||||||
|
|
||||||
// DisablePlugin() below immediately creates a .disabled file anyway, but will fail
|
// 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
|
// 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)
|
if (!dryRun)
|
||||||
{
|
{
|
||||||
|
|
@ -161,6 +156,18 @@ namespace Dalamud.Plugin
|
||||||
hasError = true;
|
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);
|
var installSuccess = InstallPlugin(remoteInfo);
|
||||||
|
|
||||||
if (installSuccess)
|
if (installSuccess)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue