typo fix and flatpak save transfer logging

pull/52/head
Miepee 4 years ago
parent c86dee019d
commit c5b011627b

@ -141,9 +141,14 @@ public partial class MainForm : Form
// Transfer saves on flatpak from non-flatpak save to flatpak save
if (OS.IsThisRunningFromFlatpak)
{
log.Info("Checking whether to transfer Flatpak saves...");
string oldHomePath = CrossPlatformOperations.Home;
Environment.SetEnvironmentVariable("HOME", $"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData, Environment.SpecialFolderOption.DoNotVerify)}/AM2RProfileSaves");
log.Info("Old home path is " + oldHomePath);
var option = Environment.SpecialFolderOption.DoNotVerify;
log.Info("option is " + option);
Environment.SetEnvironmentVariable("HOME", $"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData, option)}/AM2RProfileSaves");
string newHomePath = CrossPlatformOperations.Home;
log.Info("New home path is " + newHomePath);
// TEMPORARY transfer from main saves into Flatpak saves - TODO: remove in about half a year or so
// Only do this if the directory for the new saves does not exist yet and if the directory for old saves exists in the first place.
@ -154,7 +159,7 @@ public partial class MainForm : Form
if (Directory.Exists(newSavePath) || !Directory.Exists(oldSavePath)) continue;
log.Info($"Transfering save data for {profile.Name} from {oldSavePath} to {newSavePath} ...");
log.Info($"Transferring save data for {profile.Name} from {oldSavePath} to {newSavePath} ...");
HelperMethods.DirectoryCopy(oldSavePath, newSavePath);
}
}

@ -408,7 +408,7 @@ public static class Profile
// Delete 1.1's data.win, we don't need it anymore!
// TODO: *theoretically* if someone would make some game like serradius in gms2 and push that as a yyc am2r mod, this *will* break!
// Becauase GMS2 YYC *does* ship the data.win file, contrary to GMS1.4
// Because GMS2 YYC *does* ship the data.win file, contrary to GMS1.4
File.Delete($"{tempPath}/data.win");
}
else

Loading…
Cancel
Save