diff --git a/SabreTools.IO/PathTool.cs b/SabreTools.IO/PathTool.cs
index a92e903..0ba0db1 100644
--- a/SabreTools.IO/PathTool.cs
+++ b/SabreTools.IO/PathTool.cs
@@ -1,3 +1,4 @@
+using System;
using System.Collections.Generic;
using System.IO;
using SabreTools.IO.Extensions;
@@ -166,6 +167,18 @@ namespace SabreTools.IO
return infiles;
}
+ ///
+ /// Get the home directory for the current user
+ ///
+ public static string GetHomeDirectory()
+ {
+#if NET20 || NET35
+ return Environment.ExpandEnvironmentVariables("%HOMEDRIVE%%HOMEPATH%");
+#else
+ return Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
+#endif
+ }
+
///
/// Get the runtime directory
///
@@ -174,7 +187,7 @@ namespace SabreTools.IO
#if NET20 || NET35 || NET40 || NET452
return Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
#else
- return System.AppContext.BaseDirectory;
+ return AppContext.BaseDirectory;
#endif
}
}