Don't use Platform.ResolvePath when constructing hardcoded paths.
This commit is contained in:
@@ -55,7 +55,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
var newTemplate = panel.Get<ScrollItemWidget>("NEW_TEMPLATE");
|
||||
|
||||
var mod = modData.Manifest;
|
||||
baseSavePath = Platform.ResolvePath(Platform.SupportDirPrefix, "Saves", mod.Id, mod.Metadata.Version);
|
||||
baseSavePath = Path.Combine(Platform.SupportDir, "Saves", mod.Id, mod.Metadata.Version);
|
||||
|
||||
// Avoid filename conflicts when creating new saves
|
||||
if (isSavePanel)
|
||||
@@ -304,8 +304,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
void Save(World world)
|
||||
{
|
||||
var filename = saveTextField.Text + ".orasav";
|
||||
var testPath = Platform.ResolvePath(
|
||||
Platform.SupportDirPrefix,
|
||||
var testPath = Path.Combine(
|
||||
Platform.SupportDir,
|
||||
"Saves",
|
||||
modData.Manifest.Id,
|
||||
modData.Manifest.Metadata.Version,
|
||||
@@ -351,7 +351,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
public static bool IsLoadPanelEnabled(Manifest mod)
|
||||
{
|
||||
var baseSavePath = Platform.ResolvePath(Platform.SupportDirPrefix, "Saves", mod.Id, mod.Metadata.Version);
|
||||
var baseSavePath = Path.Combine(Platform.SupportDir, "Saves", mod.Id, mod.Metadata.Version);
|
||||
if (!Directory.Exists(baseSavePath))
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user