Skip to content

Commit

Permalink
fix delete dir when dir not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
MrXiaoM committed Oct 30, 2023
1 parent 8171252 commit 083a26a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ await Task.Run(() =>
info("(解包) Eden.apk 不存在!");
return;
}
info("(解包) 正在删除目录 ./apk...");
Directory.Delete("apk", true);
if (Directory.Exists("apk"))
{
info("(解包) 正在删除目录 ./apk...");
Directory.Delete("apk", true);
}
Directory.CreateDirectory("apk");
info("(解包) 正在解压 Eden.apk...");
ZipFile.ExtractToDirectory("Eden.apk", "apk");
Expand Down

0 comments on commit 083a26a

Please sign in to comment.