Skip to content

Commit 71d2b88

Browse files
committed
fix build?
1 parent f4631c9 commit 71d2b88

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

ElectronNET.CLI/Commands/Actions/DirectoryCopy.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,22 @@ public static void Do(string sourceDirName, string destDirName, bool copySubDirs
2323
{
2424
Directory.CreateDirectory(destDirName);
2525
}
26+
else
27+
{
28+
DirectoryInfo targetDir = new DirectoryInfo(destDirName);
29+
30+
foreach (FileInfo fileDel in targetDir.EnumerateFiles())
31+
{
32+
fileDel.Delete();
33+
}
34+
foreach (DirectoryInfo dirDel in targetDir.EnumerateDirectories())
35+
{
36+
dirDel.Delete(true);
37+
}
38+
}
39+
40+
41+
2642

2743
// Get the files in the directory and copy them to the new location.
2844
FileInfo[] files = dir.GetFiles();

0 commit comments

Comments
 (0)