Skip to content

Commit

Permalink
recursive dir delete (?)
Browse files Browse the repository at this point in the history
  • Loading branch information
oklookat committed Oct 3, 2023
1 parent f8c8414 commit 208e421
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions Creator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static void Installer(Format.Data src, bool install = true)
{
if (!File.Exists(link.Src))
{
if(!install)
if (!install)
{
throw new Exception("Not exists: " + link.Src);
}
Expand Down Expand Up @@ -69,7 +69,10 @@ public static void Installer(Format.Data src, bool install = true)
}
else
{
Directory.Delete(link.Target);
if (Directory.Exists(link.Target))
{
Directory.Delete(link.Target, true);
}
}
continue;
}
Expand Down Expand Up @@ -100,9 +103,9 @@ public static void Installer(Format.Data src, bool install = true)
}
else
{
if(Directory.Exists(target))
if (Directory.Exists(target))
{
Directory.Delete(target);
Directory.Delete(target, true);
}
}
}
Expand All @@ -116,7 +119,8 @@ public static void Installer(Format.Data src, bool install = true)
}
else
{
if (File.Exists(target)) {
if (File.Exists(target))
{
File.Delete(target);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static void Main()
}

// Hello.
Render.Str("lika v1.0");
Render.Str("lika v1.0.1");
Render.Str("> https://github.com/oklookat/lika");
Render.Str("> https://www.donationalerts.com/r/oklookat");
Render.Str("> https://boosty.to/oklookat/donate");
Expand Down

0 comments on commit 208e421

Please sign in to comment.