Fix ignored 'Failed to save map' #13036
This commit is contained in:
@@ -191,11 +191,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
}
|
||||
|
||||
map.Save(package);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Console.WriteLine("Failed to save map at {0}", combinedPath);
|
||||
}
|
||||
|
||||
// Update the map cache so it can be loaded without restarting the game
|
||||
modData.MapCache[map.Uid].UpdateFromMap(map.Package, selectedDirectory.Folder, selectedDirectory.Classification, null, map.Grid.Type);
|
||||
@@ -204,6 +199,17 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
Ui.CloseWindow();
|
||||
|
||||
onSave(map.Uid);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Write("debug", "Failed to save map at {0}: {1}", combinedPath, e.Message);
|
||||
|
||||
ConfirmationDialogs.ButtonPrompt(
|
||||
title: "Failed to save map",
|
||||
text: "See debug.log for details.",
|
||||
onConfirm: () => { },
|
||||
confirmText: "Ok");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user