From fc1072c91e4f5e24c8782e000866638bc95f7efd Mon Sep 17 00:00:00 2001 From: DrakiaXYZ <565558+DrakiaXYZ@users.noreply.github.com> Date: Tue, 4 Feb 2025 13:02:48 -0800 Subject: [PATCH] Fix mod sort order (#1104) Make sure mods are in proper alphabetical order, fsExtra is throwing special characters last for some reason --------- Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com> --- project/src/utils/FileSystem.ts | 1 + project/src/utils/FileSystemSync.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/project/src/utils/FileSystem.ts b/project/src/utils/FileSystem.ts index 5f7c9859..0bced59b 100644 --- a/project/src/utils/FileSystem.ts +++ b/project/src/utils/FileSystem.ts @@ -363,6 +363,7 @@ export class FileSystem { .map((dirent) => path.join(dirent.parentPath, dirent.name).replace(/\\/g, "/")) // Optionally remove the input directory from the path. .map((dir) => (includeInputDir ? dir : dir.replace(directoryNormalized, ""))) + .sort() ); } } diff --git a/project/src/utils/FileSystemSync.ts b/project/src/utils/FileSystemSync.ts index e559fa98..5b5ddfec 100644 --- a/project/src/utils/FileSystemSync.ts +++ b/project/src/utils/FileSystemSync.ts @@ -353,6 +353,7 @@ export class FileSystemSync { .map((dirent) => path.join(dirent.parentPath, dirent.name).replace(/\\/g, "/")) // Optionally remove the input directory from the path. .map((dir) => (includeInputDir ? dir : dir.replace(directoryNormalized, ""))) + .sort() ); } }