We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a4f691 commit 85d71f6Copy full SHA for 85d71f6
src/code/Utils.cs
@@ -1584,6 +1584,11 @@ public static void DeleteDirectoryWithRestore(string dirPath)
1584
/// </Summary>
1585
public static void DeleteDirectory(string dirPath)
1586
{
1587
+ if (!Directory.Exists(dirPath))
1588
+ {
1589
+ throw new Exception($"Path '{dirPath}' that was attempting to be deleted does not exist.");
1590
+ }
1591
+
1592
// Remove read only file attributes first
1593
foreach (var dirFilePath in Directory.GetFiles(dirPath,"*",SearchOption.AllDirectories))
1594
0 commit comments