Load assets using absolute paths. Fixes #6717.
This commit is contained in:
@@ -52,9 +52,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
|
||||
var cancelButton = panel.Get<ButtonWidget>("CANCEL_BUTTON");
|
||||
|
||||
var mirrorsFile = new string[] { Platform.SupportDir, "Content", Game.modData.Manifest.Mod.Id, "mirrors.txt" }.Aggregate(Path.Combine);
|
||||
var mirrorsFile = Platform.ResolvePath("^", "Content", Game.modData.Manifest.Mod.Id, "mirrors.txt");
|
||||
var file = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
|
||||
var dest = new string[] { Platform.SupportDir, "Content", Game.modData.Manifest.Mod.Id }.Aggregate(Path.Combine);
|
||||
var dest = Platform.ResolvePath("^", "Content", Game.modData.Manifest.Mod.Id);
|
||||
|
||||
Action<DownloadProgressChangedEventArgs> onDownloadProgress = i =>
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
insertDiskContainer.IsVisible = () => false;
|
||||
installingContainer.IsVisible = () => true;
|
||||
|
||||
var dest = new string[] { Platform.SupportDir, "Content", Game.modData.Manifest.Mod.Id }.Aggregate(Path.Combine);
|
||||
var dest = Platform.ResolvePath("^", "Content", Game.modData.Manifest.Mod.Id);
|
||||
var copyFiles = Game.modData.Manifest.ContentInstaller.CopyFilesFromCD;
|
||||
|
||||
var packageToExtract = Game.modData.Manifest.ContentInstaller.PackageToExtractFromCD.Split(':');
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
newsStatus = newsPanel.Get<LabelWidget>("NEWS_STATUS");
|
||||
SetNewsStatus("Loading news");
|
||||
|
||||
var cacheFile = Path.Combine(Platform.SupportDir, "news.yaml");
|
||||
var cacheFile = Platform.ResolvePath("^", "news.yaml");
|
||||
var currentNews = ParseNews(cacheFile);
|
||||
if (currentNews != null)
|
||||
DisplayNews(currentNews);
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
|
||||
var yaml = new MiniYaml(null, Game.modData.Manifest.Missions.Select(MiniYaml.FromFile).Aggregate(MiniYaml.MergeLiberal)).ToDictionary();
|
||||
|
||||
var missionMapPaths = yaml["Missions"].Nodes.Select(n => Path.GetFullPath(n.Key));
|
||||
var missionMapPaths = yaml["Missions"].Nodes.Select(n => Platform.ResolvePath(n.Key));
|
||||
|
||||
var maps = Game.modData.MapCache
|
||||
.Where(p => p.Status == MapStatus.Available && missionMapPaths.Contains(Path.GetFullPath(p.Map.Path)))
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
var template = panel.Get<ScrollItemWidget>("REPLAY_TEMPLATE");
|
||||
|
||||
var mod = Game.modData.Manifest.Mod;
|
||||
var dir = new[] { Platform.SupportDir, "Replays", mod.Id, mod.Version }.Aggregate(Path.Combine);
|
||||
var dir = Platform.ResolvePath("^", "Replays", mod.Id, mod.Version);
|
||||
|
||||
replayList.RemoveChildren();
|
||||
if (Directory.Exists(dir))
|
||||
|
||||
Reference in New Issue
Block a user