From 6e826f0fd0c69715131ecf3f282e42f36a4d3c62 Mon Sep 17 00:00:00 2001 From: Matt Brailsford Date: Tue, 27 Jun 2023 09:01:25 +0100 Subject: [PATCH 1/2] Sort manifest file paths alphabetically --- 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 4dbd6abd4066..f85eca3420dd 100644 --- a/src/Umbraco.Infrastructure/Manifest/ManifestParser.cs +++ b/src/Umbraco.Infrastructure/Manifest/ManifestParser.cs @@ -250,6 +250,11 @@ private IEnumerable GetManifestFiles() return Array.Empty(); } - return Directory.GetFiles(_path, "package.manifest", SearchOption.AllDirectories); + var files = Directory.GetFiles(_path, "package.manifest", SearchOption.AllDirectories); + + // Ensure a consistent sorting of paths + Array.Sort(files); + + return files; } } From 8455ba20b010c57b24bf705e1899d228f1461b75 Mon Sep 17 00:00:00 2001 From: Matt Brailsford Date: Thu, 21 Nov 2024 13:15:58 +0000 Subject: [PATCH 2/2] Update src/Umbraco.Infrastructure/Manifest/ManifestParser.cs Co-authored-by: Ronald Barendse --- src/Umbraco.Infrastructure/Manifest/ManifestParser.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Infrastructure/Manifest/ManifestParser.cs b/src/Umbraco.Infrastructure/Manifest/ManifestParser.cs index f85eca3420dd..f43f6852a62b 100644 --- a/src/Umbraco.Infrastructure/Manifest/ManifestParser.cs +++ b/src/Umbraco.Infrastructure/Manifest/ManifestParser.cs @@ -252,7 +252,7 @@ private IEnumerable GetManifestFiles() var files = Directory.GetFiles(_path, "package.manifest", SearchOption.AllDirectories); - // Ensure a consistent sorting of paths + // 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;