瀏覽代碼

Make sure '.mono/metadata/' exists before creating file

Fixes #31549
Ignacio Etcheverry 6 年之前
父節點
當前提交
dae2a335c5
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      modules/mono/editor/GodotTools/GodotTools/Ides/GodotIdeServer.cs

+ 4 - 0
modules/mono/editor/GodotTools/GodotTools/Ides/GodotIdeServer.cs

@@ -9,6 +9,7 @@ using System.Threading.Tasks;
 using GodotTools.IdeConnection;
 using GodotTools.Internals;
 using GodotTools.Utils;
+using Directory = System.IO.Directory;
 using File = System.IO.File;
 using Thread = System.Threading.Thread;
 
@@ -33,6 +34,9 @@ namespace GodotTools.Ides
 
             this.launchIdeAction = launchIdeAction;
 
+            // Make sure the directory exists
+            Directory.CreateDirectory(projectMetadataDir);
+
             // The Godot editor's file system thread can keep the file open for writing, so we are forced to allow write sharing...
             const FileShare metaFileShare = FileShare.ReadWrite;