From 19e304ab043f6e7a258cb6ab9ac8273da5f34361 Mon Sep 17 00:00:00 2001 From: Justin Aquadro Date: Mon, 18 Feb 2013 01:38:33 -0500 Subject: [PATCH] Check %APPDATA% for Minecraft dir first --- Properties/AssemblyInfo.cs | 4 ++-- Windows/MainForm.cs | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index e0af639..e7c3903 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -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")] diff --git a/Windows/MainForm.cs b/Windows/MainForm.cs index 0bb6ee9..69160b0 100644 --- a/Windows/MainForm.cs +++ b/Windows/MainForm.cs @@ -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");