Skip to content

Commit

Permalink
create typing when not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
BlurryLight committed Nov 12, 2024
1 parent 6a463d7 commit effda5d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions unreal/Puerts/Source/JsEnv/JsEnv.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,13 @@ public JsEnv(ReadOnlyTargetRules Target) : base(Target)
"ffi/index.d.ts"
};
destDirName = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "..", "..", "Typing"));
if(Directory.Exists(destDirName))
Directory.CreateDirectory(destDirName); // create when not exists, otherwise skip it
foreach (var Source in SourceFiles)
{
foreach (var Source in SourceFiles)
{
string src = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "Typing", Source));
string dest = Path.GetFullPath(Path.Combine(destDirName, Source));
// Logger.LogDebug("Copy " + Source + " from " + src + " to " + dest);
File.Copy(src, dest, true);
}
string src = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "Typing", Source));
string dest = Path.GetFullPath(Path.Combine(destDirName, Source));
// Logger.LogDebug("Copy " + Source + " from " + src + " to " + dest);
File.Copy(src, dest, true);
}
}

Expand Down

0 comments on commit effda5d

Please sign in to comment.