mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: disable ALL previous versions regardless
This commit is contained in:
parent
02d3c68271
commit
4533781b2f
1 changed files with 12 additions and 2 deletions
|
|
@ -73,7 +73,7 @@ namespace Dalamud.Plugin
|
|||
continue;
|
||||
}
|
||||
|
||||
var sortedVersions = versions.OrderBy(x => x.CreationTime);
|
||||
var sortedVersions = versions.OrderBy(x => int.Parse(x.Name.Replace(".","")));
|
||||
var latest = sortedVersions.Last();
|
||||
|
||||
var localInfoFile = new FileInfo(Path.Combine(latest.FullName, $"{installed.Name}.json"));
|
||||
|
|
@ -96,7 +96,17 @@ namespace Dalamud.Plugin
|
|||
|
||||
if (remoteInfo.AssemblyVersion != info.AssemblyVersion)
|
||||
{
|
||||
this.manager.DisablePlugin(info);
|
||||
foreach (var sortedVersion in sortedVersions) {
|
||||
File.Create(Path.Combine(sortedVersion.FullName, ".disabled"));
|
||||
}
|
||||
|
||||
// Try to disable plugin if it is loaded
|
||||
try {
|
||||
this.manager.DisablePlugin(info);
|
||||
} catch {
|
||||
// ignored
|
||||
}
|
||||
|
||||
InstallPlugin(remoteInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue