Sort contents before merging to unify UIDs across filesystems.
This commit is contained in:
committed by
abcdefg30
parent
4d46464bc6
commit
b16cbeacb6
@@ -12,6 +12,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace OpenRA.FileSystem
|
namespace OpenRA.FileSystem
|
||||||
{
|
{
|
||||||
@@ -32,10 +33,11 @@ namespace OpenRA.FileSystem
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
foreach (var filename in Directory.GetFiles(path, "*", SearchOption.TopDirectoryOnly))
|
// Order may vary on different file systems and it matters for hashing.
|
||||||
yield return Path.GetFileName(filename);
|
return Directory.GetFiles(path, "*", SearchOption.TopDirectoryOnly)
|
||||||
foreach (var filename in Directory.GetDirectories(path))
|
.Concat(Directory.GetDirectories(path))
|
||||||
yield return Path.GetFileName(filename);
|
.Select(Path.GetFileName)
|
||||||
|
.OrderBy(f => f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user