1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:02:53 +08:00

Fix wrong path being used in fail handler

This commit is contained in:
Bartłomiej Dach 2022-12-23 16:42:46 +01:00
parent 3dfbb47b01
commit 9a2cc04361
No known key found for this signature in database

View File

@ -126,7 +126,7 @@ namespace osu.Game.Overlays
request.Failure += ex =>
{
if (ex is not OperationCanceledException)
Schedule(onFail);
Schedule(onFail, request.Path);
};
api.PerformAsync(request);
@ -155,11 +155,11 @@ namespace osu.Game.Overlays
}
}
private void onFail()
private void onFail(string originalPath)
{
path.Value = "error";
LoadDisplay(articlePage = new WikiArticlePage($@"{api.WebsiteRootUrl}/wiki/",
$"Something went wrong when trying to fetch page \"{path.Value}\".\n\n[Return to the main page](Main_Page)."));
$"Something went wrong when trying to fetch page \"{originalPath}\".\n\n[Return to the main page](Main_Page)."));
}
private void showParentPage()