From 01dd16d4088ee1057d4d32a310f1f9f6fb1d4d3e Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 6 Aug 2009 22:36:39 +0100 Subject: Add sorting to prebuild --- Prebuild/src/Core/Parse/Preprocessor.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Prebuild/src/Core/Parse/Preprocessor.cs b/Prebuild/src/Core/Parse/Preprocessor.cs index 9ac07b9..57d4062 100644 --- a/Prebuild/src/Core/Parse/Preprocessor.cs +++ b/Prebuild/src/Core/Parse/Preprocessor.cs @@ -607,7 +607,9 @@ namespace Prebuild.Core.Parse // If preWildcard is a directory, recurse if (Directory.Exists(preWildcard)) { - foreach (string dirPath in Directory.GetDirectories(preWildcard)) + string[] directories = Directory.GetDirectories(preWildcard); + Array.Sort(directories); + foreach (string dirPath in directories ) { Console.WriteLine("Scanning : {0}", dirPath); @@ -638,7 +640,9 @@ namespace Prebuild.Core.Parse string searchDirectory = Path.GetDirectoryName(preWildcard); // Console.WriteLine("searchDirectory: {0}", searchDirectory); - foreach (string includeFile in Directory.GetFiles(searchDirectory, searchFilename)) + string[] files = Directory.GetFiles(searchDirectory, searchFilename); + Array.Sort(files); + foreach (string includeFile in files) { FileInfo file = new FileInfo(includeFile); if (file.Exists) -- cgit v1.1