Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit 69446f7

Browse files
authored
Fix CopyTemplate for downloaded package. Make sure the copied version is writeable (#1281)
1 parent 5cf12be commit 69446f7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

workers/unity/Packages/io.improbable.gdk.tools/GenerateCode.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,10 @@ private static void CopyDirectory(string source, string dest)
332332

333333
foreach (var file in dirInfo.GetFiles())
334334
{
335-
file.CopyTo(Path.Combine(dest, file.Name));
335+
var filePath = Path.Combine(dest, file.Name);
336+
file.CopyTo(filePath);
337+
var fileInfo = new FileInfo(filePath);
338+
fileInfo.IsReadOnly = false;
336339
}
337340

338341
foreach (var dir in dirInfo.GetDirectories())

0 commit comments

Comments
 (0)