Make sure the profiles directory exists

This commit is contained in:
Lars Brubaker 2016-07-18 15:18:17 -07:00
parent 1dac8be6a8
commit e39ad85d87
3 changed files with 26 additions and 2 deletions

View file

@ -54,7 +54,19 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
private static EventHandler unregisterEvents;
private static readonly string userDataPath = ApplicationDataStorage.ApplicationUserDataPath;
private static readonly string ProfilesPath = Path.Combine(userDataPath, "Profiles");
private static string ProfilesPath
{
get
{
string path = Path.Combine(userDataPath, "Profiles");
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
return path;
}
}
private const string userDBExtension = ".profiles";
private const string guestDBFileName = "guest" + userDBExtension;