From c7014e159b93a177b19077cdedcddee93faf180b Mon Sep 17 00:00:00 2001 From: Matt Brailsford Date: Thu, 21 Nov 2024 16:19:48 +0100 Subject: [PATCH] Sort manifest file paths alphabetically (#14466) * Sort manifest file paths alphabetically * Update src/Umbraco.Infrastructure/Manifest/ManifestParser.cs Co-authored-by: Ronald Barendse --------- Co-authored-by: Ronald Barendse --- src/Umbraco.Infrastructure/Manifest/ManifestParser.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Infrastructure/Manifest/ManifestParser.cs b/src/Umbraco.Infrastructure/Manifest/ManifestParser.cs index 4dbd6abd40..f43f6852a6 100644 --- a/src/Umbraco.Infrastructure/Manifest/ManifestParser.cs +++ b/src/Umbraco.Infrastructure/Manifest/ManifestParser.cs @@ -250,6 +250,11 @@ public class ManifestParser : IManifestParser return Array.Empty(); } - return Directory.GetFiles(_path, "package.manifest", SearchOption.AllDirectories); + var files = Directory.GetFiles(_path, "package.manifest", SearchOption.AllDirectories); + + // Ensure a consistent, alphabetical sorting of paths, because this is not guaranteed to be the same between file systems or OSes + Array.Sort(files); + + return files; } }