Sort manifest file paths alphabetically (#14466)

* Sort manifest file paths alphabetically

* Update src/Umbraco.Infrastructure/Manifest/ManifestParser.cs

Co-authored-by: Ronald Barendse <ronald@barend.se>

---------

Co-authored-by: Ronald Barendse <ronald@barend.se>
This commit is contained in:
Matt Brailsford
2024-11-21 16:19:48 +01:00
committed by GitHub
parent 31e1acce67
commit c7014e159b

View File

@@ -250,6 +250,11 @@ public class ManifestParser : IManifestParser
return Array.Empty<string>();
}
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;
}
}