Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit baf6f6b

Browse files
committed
Preventing the Self Check from screwing up the updating process (damn!)
1 parent 6cbd80e commit baf6f6b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

‎Source/WatchDogInstallChecker/Startup.cs‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,17 @@ private void OnDestroy()
9696

9797
private string CheckMyself()
9898
{
99-
IEnumerable<AssemblyLoader.LoadedAssembly> loaded = SanityLib.FetchLoadedAssembliesByName(this.GetType().Assembly.GetName().Name);
99+
// The previous, minimalistic, check was hurting the update process, when a new DLL would be, in fact, in the MMWD's diretory.
100+
// So we ignore these copies when the effectivelly loaded on is the one named 666_ModuleManagerWatchDog.dll .
101+
{
102+
IEnumerable<AssemblyLoader.LoadedAssembly> loaded = SanityLib.FetchLoadedAssembliesByName(this.GetType().Assembly.GetName().Name);
100103

101-
// Obviously, would be pointless to check for it not being installed! (0 == count). :)
102-
if (1 != loaded.Count()) return ErrorMessage.ERR_MULTIPLE_TOOL;
104+
// Obviously, would be pointless to check for it not being installed! (0 == count). :)
105+
if (loaded.Count() > 1
106+
&& !"666_ModuleManagerWatchDog.dll".Equals(System.IO.Path.GetFileName(loaded.First().assembly.Location), StringComparison.InvariantCultureIgnoreCase)
107+
)
108+
return ErrorMessage.ERR_MULTIPLE_TOOL;
109+
}
103110
return null;
104111
}
105112
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /