aboutsummaryrefslogtreecommitdiff
path: root/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-11-06 18:25:28 -0500
committerGitHub <[email protected]>2017-11-06 18:25:28 -0500
commit5e56859b9a57f8b4e65d75fc70135e3680c5cb66 (patch)
treeed103a9f2bf4d45567ab032eeb252a0672029526 /Histacom2/SaveDialogs/SaveFileTroubleShooter.cs
parentf0e2d14a959db1e5d35c4dc5f77ed3523c93200a (diff)
parentbf40637c6358b07f9dee16809326bc7430c1d983 (diff)
downloadhistacom2-5e56859b9a57f8b4e65d75fc70135e3680c5cb66.tar.gz
histacom2-5e56859b9a57f8b4e65d75fc70135e3680c5cb66.tar.bz2
histacom2-5e56859b9a57f8b4e65d75fc70135e3680c5cb66.zip
Merge pull request #181 from RogueAI42/master
clean up my old junk from save system
Diffstat (limited to 'Histacom2/SaveDialogs/SaveFileTroubleShooter.cs')
-rw-r--r--Histacom2/SaveDialogs/SaveFileTroubleShooter.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs b/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs
index 3283ca1..7fe258f 100644
--- a/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs
+++ b/Histacom2/SaveDialogs/SaveFileTroubleShooter.cs
@@ -42,12 +42,12 @@ namespace Histacom2.SaveDialogs
// Check if the main.save file exists
- string savefile = Path.Combine(SaveSystem.ProfileDirectory, "main.save");
- string oldsavefile = Path.Combine(SaveSystem.ProfileDirectory, "oldmain.save");
+ string savefile = Path.Combine(SaveSystem.ProfileDirectory, SaveSystem.ProfileFile);
+ string oldsavefile = Path.Combine(SaveSystem.ProfileDirectory, "old" + SaveSystem.ProfileFile);
if (!File.Exists(savefile))
{
- WriteToLog("ISSUE FOUND! File main.save doesn't exist");
+ WriteToLog($"ISSUE FOUND! File {SaveSystem.ProfileFile} doesn't exist");
WriteToLog("Creating one...");
@@ -58,7 +58,7 @@ namespace Histacom2.SaveDialogs
EndScan(true);
return;
} else {
- WriteToLog("File main.save does exist - checking contents");
+ WriteToLog($"File {SaveSystem.ProfileFile} does exist - checking contents");
bool readable = false;
try
@@ -136,11 +136,11 @@ namespace Histacom2.SaveDialogs
} catch {
// It's unusable...
- WriteToLog("ISSUE FOUND! File main.save is unreadable");
+ WriteToLog($"ISSUE FOUND! File {SaveSystem.ProfileFile} is unreadable");
WriteToLog("Sorry, there is no repairing it easily, your data will be lost");
- string backupfile = Path.Combine(SaveSystem.ProfileDirectory, "main.backup");
+ string backupfile = savefile + ".bak";
if (Directory.Exists(backupfile)) Directory.Delete(backupfile);