diff --git a/OpenRA.Game/FileSystem/Folder.cs b/OpenRA.Game/FileSystem/Folder.cs index cfcc2a8e26..7219fba7df 100644 --- a/OpenRA.Game/FileSystem/Folder.cs +++ b/OpenRA.Game/FileSystem/Folder.cs @@ -44,7 +44,8 @@ namespace OpenRA.FileSystem 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)