Skip to content

Commit

Permalink
Delete old dir
Browse files Browse the repository at this point in the history
  • Loading branch information
uholeschak committed Dec 20, 2024
1 parent 61c137f commit cc0316d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Tools/ApkUncompress2/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ static int Main(string[] args)
continue;
}

string outDirBase = Path.Combine(srcDir, baseFileName);
if (Directory.Exists(outDirBase))
{
Directory.Delete(outDirBase, true);
}

foreach (AssemblyStoreExplorer store in explorers)
{
if (store.Assemblies != null)
Expand All @@ -65,7 +71,7 @@ static int Main(string[] args)
}

string archName = store.TargetArch.HasValue ? store.TargetArch.Value.ToString().ToLowerInvariant() : "unknown";
string outFile = Path.Combine(srcDir, baseFileName, archName, storeItem.Name);
string outFile = Path.Combine(outDirBase, archName, storeItem.Name);
string? outDir = Path.GetDirectoryName(outFile);
if (string.IsNullOrEmpty(outDir))
{
Expand Down

0 comments on commit cc0316d

Please sign in to comment.