Fix false Folder contains for absolute paths.
This commit is contained in:
@@ -44,7 +44,8 @@ namespace OpenRA.FileSystem
|
|||||||
|
|
||||||
public bool Contains(string filename)
|
public bool Contains(string filename)
|
||||||
{
|
{
|
||||||
return File.Exists(Path.Combine(path, filename));
|
var combined = Path.Combine(path, filename);
|
||||||
|
return combined.StartsWith(path) && File.Exists(combined);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Update(string filename, byte[] contents)
|
public void Update(string filename, byte[] contents)
|
||||||
|
|||||||
Reference in New Issue
Block a user