Add sorting to prebuild

arthursv
Melanie 2009-08-06 22:36:39 +01:00
parent 91f6898b26
commit 01dd16d408
1 changed files with 6 additions and 2 deletions

View File

@ -607,7 +607,9 @@ namespace Prebuild.Core.Parse
// If preWildcard is a directory, recurse // If preWildcard is a directory, recurse
if (Directory.Exists(preWildcard)) 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); Console.WriteLine("Scanning : {0}", dirPath);
@ -638,7 +640,9 @@ namespace Prebuild.Core.Parse
string searchDirectory = Path.GetDirectoryName(preWildcard); string searchDirectory = Path.GetDirectoryName(preWildcard);
// Console.WriteLine("searchDirectory: {0}", searchDirectory); // 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); FileInfo file = new FileInfo(includeFile);
if (file.Exists) if (file.Exists)