Skip to content

Commit

Permalink
Add cache folder detection to main window open
Browse files Browse the repository at this point in the history
  • Loading branch information
kwsch committed Apr 6, 2016
1 parent e349907 commit 4f6f0dd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions PKX/f1-Main.cs
Expand Up @@ -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")))
Expand All @@ -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"))) { }
Expand Down

0 comments on commit 4f6f0dd

Please sign in to comment.