Skip to content

Commit

Permalink
Update MelonFolderHandler.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
HerpDerpinstine committed Oct 15, 2024
1 parent e06d0e7 commit f6e44ea
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions MelonLoader/Melons/MelonFolderHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ private static void ProcessFolder<T>(string path,
// Skip any folders that doesn't end with or isn't equal to UserLibs
string dirName = new DirectoryInfo(dir).Name;
string dirNameLower = dirName.ToLowerInvariant();
if (dirNameLower.EndsWith("disabled"))
if (dirNameLower.StartsWith("disabled")
|| dirNameLower.EndsWith("disabled")
|| dirNameLower.StartsWith("old")
|| dirNameLower.EndsWith("old"))
continue;

// Load Assemblies
Expand All @@ -134,6 +137,12 @@ private static void ProcessFolder<T>(string path,
// Skip any folders that doesn't end with or isn't equal to UserLibs
string dirName = new DirectoryInfo(dir).Name;
string dirNameLower = dirName.ToLowerInvariant();
if (dirNameLower.StartsWith("disabled")
|| dirNameLower.EndsWith("disabled")
|| dirNameLower.StartsWith("old")
|| dirNameLower.EndsWith("old"))
continue;

if (!dirNameLower.EndsWith("userlibs"))
continue;

Expand All @@ -151,7 +160,10 @@ private static void ProcessFolder<T>(string path,
// Skip any folders that ends with or is equal to Disabled
string dirName = new DirectoryInfo(dir).Name;
string dirNameLower = dirName.ToLowerInvariant();
if (dirNameLower.EndsWith("disabled"))
if (dirNameLower.StartsWith("disabled")
|| dirNameLower.EndsWith("disabled")
|| dirNameLower.StartsWith("old")
|| dirNameLower.EndsWith("old"))
continue;

// Load Melons from Extended Folder
Expand Down

0 comments on commit f6e44ea

Please sign in to comment.