浏览代码

Put autosaves in extra temp directory

CPKreuz 1 年之前
父节点
当前提交
9e7911f1f5
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/PixiEditor/ViewModels/SubViewModels/Document/AutosaveViewModel.cs

+ 3 - 1
src/PixiEditor/ViewModels/SubViewModels/Document/AutosaveViewModel.cs

@@ -132,7 +132,9 @@ internal class AutosaveViewModel : NotifyableObject
 
         if (Document.FullFilePath == null || !Document.FullFilePath.EndsWith(".pixi"))
         {
-            filePath = Path.Combine(Path.GetTempPath(), "PixiEditor", $"autosave-{tempGuid}.pixi");
+            var root = Path.Combine(Path.GetTempPath(), "PixiEditor", "autosave");
+            Directory.CreateDirectory(root);
+            filePath = Path.Combine(root, $"autosave-{tempGuid}.pixi");
             Document.MarkAsSaved();
         }
         else