Check %APPDATA% for Minecraft dir first

This commit is contained in:
Justin Aquadro 2013-02-18 01:38:33 -05:00
parent 15d27c1ff9
commit 19e304ab04
2 changed files with 7 additions and 3 deletions

View file

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.3.0.0")]
[assembly: AssemblyFileVersion("2.3.0.0")]
[assembly: AssemblyVersion("2.3.1.0")]
[assembly: AssemblyFileVersion("2.3.1.0")]

View file

@ -202,7 +202,11 @@ namespace NBTExplorer.Windows
return;
try {
string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string path = Environment.ExpandEnvironmentVariables("%APPDATA%");
if (!Directory.Exists(path)) {
path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
}
path = Path.Combine(path, ".minecraft");
path = Path.Combine(path, "saves");