Add cache folder detection to main window open

This commit is contained in:
Kaphotics
2016-04-05 20:27:57 -07:00
parent e3499073cb
commit 4f6f0dddf0

View File

@@ -204,6 +204,7 @@ private void mainMenuOpen(object sender, EventArgs e)
// Detect main
string cyberpath = Util.GetTempFolder();
string cachepath = Util.GetCacheFolder();
pathSDF = Util.GetSDFLocation();
path3DS = Util.get3DSLocation();
if (path3DS != null && File.Exists(Path.Combine(Path.GetPathRoot(path3DS), "SaveDataBackup", "main")))
@@ -214,6 +215,8 @@ private void mainMenuOpen(object sender, EventArgs e)
ofd.InitialDirectory = Path.GetPathRoot(path3DS);
else if (Directory.Exists(Path.Combine(cyberpath, "root")))
ofd.InitialDirectory = Path.Combine(cyberpath, "root");
else if (Directory.Exists(cachepath))
ofd.InitialDirectory = cachepath;
else if (Directory.Exists(cyberpath))
ofd.InitialDirectory = cyberpath;
else if (File.Exists(Path.Combine(ofd.InitialDirectory, "main"))) { }