Skip to content

Commit 1a847fd

Browse files
committed
Fix core and game extensions being loaded with other extensions
1 parent e749a2d commit 1a847fd

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/Extensions/ExtensionManager.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public void LoadAllExtensions(string directory)
279279
};
280280
string[] gameExtensions = {
281281
"Oxide.Blackwake", "Oxide.Blockstorm", "Oxide.FortressCraft", "Oxide.FromTheDepths", "Oxide.GangBeasts", "Oxide.Hurtworld",
282-
"Oxide.InterstellarRift", "Oxide.MedievalEngineers", "Oxide.Nomad", "Oxide.PlanetExplorers", "Oxide.ReignOfKings", "Oxide.Rust",
282+
"Oxide.InterstellarRift", "Oxide.MedievalEngineers", "Oxide.Nomad", "Oxide.PlanetExplorers", "Oxide.ReignOfKings", "Oxide.Rust",
283283
"Oxide.RustLegacy", "Oxide.SavageLands", "Oxide.SevenDaysToDie", "Oxide.SpaceEngineers", "Oxide.TheForest", "Oxide.Terraria",
284284
"Oxide.Unturned"
285285
};
@@ -305,11 +305,13 @@ public void LoadAllExtensions(string directory)
305305
continue;
306306
}
307307

308-
if (coreExtensions.Contains(extPath.Basename()))
308+
string fileName = Path.GetFileNameWithoutExtension(extPath);
309+
310+
if (coreExtensions.Contains(fileName))
309311
{
310312
foundCore.Add(extPath);
311313
}
312-
else if (gameExtensions.Contains(extPath.Basename()))
314+
else if (gameExtensions.Contains(fileName))
313315
{
314316
foundGame.Add(extPath);
315317
}

0 commit comments

Comments
 (0)