diff --git a/MatterControlLib/ApplicationView/ApplicationController.cs b/MatterControlLib/ApplicationView/ApplicationController.cs index ee5b7a936..063c9cda6 100644 --- a/MatterControlLib/ApplicationView/ApplicationController.cs +++ b/MatterControlLib/ApplicationView/ApplicationController.cs @@ -2566,12 +2566,8 @@ namespace MatterHackers.MatterControl // Create archive point for printing attempt if (Path.GetExtension(sourcePath).ToUpper() == ".MCX") { - // TODO: We should zip mcx and settings when starting a print - string platingDirectory = Path.Combine(ApplicationDataStorage.Instance.ApplicationLibraryDataPath, "PrintHistory"); - Directory.CreateDirectory(platingDirectory); - string now = "Workspace " + DateTime.Now.ToString("yyyy-MM-dd HH_mm_ss"); - string archivePath = Path.Combine(platingDirectory, now + ".zip"); + string archivePath = Path.Combine(ApplicationDataStorage.Instance.PrintHistoryPath, now + ".zip"); string settingsFilePath = ProfileManager.Instance.ProfilePath(printer.Settings.ID); diff --git a/MatterControlLib/DataStorage/ApplicationDataStorage.cs b/MatterControlLib/DataStorage/ApplicationDataStorage.cs index 04b0fd4e9..c3ba816c9 100644 --- a/MatterControlLib/DataStorage/ApplicationDataStorage.cs +++ b/MatterControlLib/DataStorage/ApplicationDataStorage.cs @@ -88,6 +88,8 @@ namespace MatterHackers.MatterControl.DataStorage private static string _cacheDirectory => Path.Combine(_applicationTempDataPath, "cache"); + private static string _printHistoryPath => Path.Combine(_applicationLibraryDataPath, "PrintHistory"); + private static string _webCacheDirectory => Path.Combine(_applicationTempDataPath, "WebCache"); public static string ApplicationUserDataPath => EnsurePath(_applicationUserDataPath); @@ -104,6 +106,8 @@ namespace MatterHackers.MatterControl.DataStorage public string CacheDirectory => EnsurePath(_cacheDirectory); + public string PrintHistoryPath => EnsurePath(_printHistoryPath); + public string WebCacheDirectory => EnsurePath(_webCacheDirectory); public string DownloadsDirectory { get; } = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Downloads");