Remove Platform.IsPathRelativeToSupportDirectory.
This commit is contained in:
@@ -72,13 +72,10 @@ namespace OpenRA
|
||||
try
|
||||
{
|
||||
// HACK: If the path is inside the the support directory then we may need to create it
|
||||
if (Platform.IsPathRelativeToSupportDirectory(name))
|
||||
{
|
||||
// Assume that the path is a directory if there is not an existing file with the same name
|
||||
var resolved = Platform.ResolvePath(name);
|
||||
if (!File.Exists(resolved))
|
||||
Directory.CreateDirectory(resolved);
|
||||
}
|
||||
// Assume that the path is a directory if there is not an existing file with the same name
|
||||
var resolved = Platform.ResolvePath(name);
|
||||
if (resolved.StartsWith(Platform.SupportDir) && !File.Exists(resolved))
|
||||
Directory.CreateDirectory(resolved);
|
||||
|
||||
package = modData.ModFiles.OpenPackage(name);
|
||||
}
|
||||
@@ -144,12 +141,9 @@ namespace OpenRA
|
||||
name = name.Substring(1);
|
||||
|
||||
// Don't try to open the map directory in the support directory if it doesn't exist
|
||||
if (Platform.IsPathRelativeToSupportDirectory(name))
|
||||
{
|
||||
var resolved = Platform.ResolvePath(name);
|
||||
if (!Directory.Exists(resolved) || !File.Exists(resolved))
|
||||
continue;
|
||||
}
|
||||
var resolved = Platform.ResolvePath(name);
|
||||
if (resolved.StartsWith(Platform.SupportDir) && (!Directory.Exists(resolved) || !File.Exists(resolved)))
|
||||
continue;
|
||||
|
||||
using (var package = (IReadWritePackage)modData.ModFiles.OpenPackage(name))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user