Commit f5eec87b authored by piratesephiroth's avatar piratesephiroth
Browse files

Only delete nuspacker's temporary folders if they exist

parent 6499d514
...@@ -2193,9 +2193,9 @@ namespace TeconMoon_s_WiiVC_Injector ...@@ -2193,9 +2193,9 @@ namespace TeconMoon_s_WiiVC_Injector
//Delete Temp Directories //Delete Temp Directories
Directory.SetCurrentDirectory(Application.StartupPath); Directory.SetCurrentDirectory(Application.StartupPath);
Directory.Delete(TempBuildPath, true); DeleteFolder(TempBuildPath, true);
Directory.Delete(TempRootPath + "output", true); DeleteFolder(TempRootPath + "output", true);
Directory.Delete(TempRootPath + "tmp", true); DeleteFolder(TempRootPath + "tmp", true);
Directory.CreateDirectory(TempBuildPath); Directory.CreateDirectory(TempBuildPath);
///////////////////////// /////////////////////////
...@@ -2237,5 +2237,13 @@ namespace TeconMoon_s_WiiVC_Injector ...@@ -2237,5 +2237,13 @@ namespace TeconMoon_s_WiiVC_Injector
} }
} }
private static void DeleteFolder(string path, bool recursive)
{
if (Directory.Exists(path))
{
Directory.Delete(path, recursive);
}
}
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment