Skip to content

Commit

Permalink
Loading modules from two locations at once no longer crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brayconn committed Apr 27, 2019
1 parent ac580bf commit 6984533
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions FileSplitter/FileSplitter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,7 @@ public FileSplitter(bool autoLoad, Type[] modules, string[] pluginFolders, Progr

//Sorts modules alphabetically
loadedTypes.Sort((x, y) => ((IFileSplitterModule)Activator.CreateInstance(x)).DisplayName.CompareTo(((IFileSplitterModule)Activator.CreateInstance(y)).DisplayName));
loadedTypes = loadedTypes.Distinct().ToList();

//Lists every module by its display name
LoadedModules = new ReadOnlyDictionary<string, Type>(loadedTypes.ToDictionary(x => ((IFileSplitterModule)Activator.CreateInstance(x)).DisplayName, y => y));
Expand Down

0 comments on commit 6984533

Please sign in to comment.