Give an proper error when a file is not found

This commit is contained in:
abcdefg30
2017-02-04 00:45:32 +01:00
parent ad5a9a85f9
commit aa73b19ee2
2 changed files with 9 additions and 2 deletions

View File

@@ -9,6 +9,7 @@
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
@@ -47,7 +48,7 @@ namespace OpenRA.FileSystem
public bool Contains(string filename)
{
var combined = Path.Combine(path, filename);
return combined.StartsWith(path) && File.Exists(combined);
return combined.StartsWith(path, StringComparison.Ordinal) && File.Exists(combined);
}
public void Update(string filename, byte[] contents)