Support relative paths to Object3D assets

This commit is contained in:
John Lewin 2017-07-12 14:47:01 -07:00
parent 3ba370e349
commit 820ad61c55
4 changed files with 12 additions and 3 deletions

View file

@ -46,7 +46,7 @@ namespace MatterHackers.MatterControl.DataStorage
private readonly string datastoreName = "MatterControl.db";
private string applicationPath;
private static string applicationUserDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), applicationDataFolderName);
public ApplicationDataStorage()
//Constructor - validates that local storage folder exists, creates if necessary
{
@ -55,6 +55,8 @@ namespace MatterHackers.MatterControl.DataStorage
{
dir.Create();
}
Directory.CreateDirectory(this.LibraryAssetsPath);
}
/// <summary>
@ -113,6 +115,8 @@ namespace MatterHackers.MatterControl.DataStorage
}
}
public string LibraryAssetsPath => Path.Combine(this.ApplicationLibraryDataPath, "Assets");
/// <summary>
/// Overrides the AppData location.
/// </summary>