Skip to content

Commit

Permalink
Make sure files are sorted alphabetically in mod list
Browse files Browse the repository at this point in the history
  • Loading branch information
maddie480 committed Mar 20, 2024
1 parent 01fb78e commit efa5d98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ and only contains the latest changes.
Its purpose is to be shown in Olympus when updating.

#changelog#
Attempt at a fix for permanent scanning issues on Linux
Make sure files in the "Manage Installed Mods" screen are sorted alphabetically, even on Mac/Linux
3 changes: 3 additions & 0 deletions sharp/CmdModList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public override IEnumerator Run(string root, bool readYamls, bool computeHashes,
// === mod directories

string[] files = Directory.GetDirectories(root);
Array.Sort(files, (a, b) => string.Compare(a, b, ignoreCase: true));
for (int i = 0; i < files.Length; i++) {
string file = files[i];
string name = Path.GetFileName(file);
Expand Down Expand Up @@ -69,6 +70,7 @@ public override IEnumerator Run(string root, bool readYamls, bool computeHashes,
{
// === mod zips
string[] files = Directory.GetFiles(root);
Array.Sort(files, (a, b) => string.Compare(a, b, ignoreCase: true));
for (int i = 0; i < files.Length; i++) {
string file = files[i];
string name = Path.GetFileName(file);
Expand Down Expand Up @@ -108,6 +110,7 @@ public override IEnumerator Run(string root, bool readYamls, bool computeHashes,
if (!onlyUpdatable) {
// === bin files
string[] files = Directory.GetFiles(root);
Array.Sort(files, (a, b) => string.Compare(a, b, ignoreCase: true));

for (int i = 0; i < files.Length; i++) {
string file = files[i];
Expand Down

0 comments on commit efa5d98

Please sign in to comment.