clean up pdb files on client, hash assembly file names

This commit is contained in:
Shaun Walker
2022-09-14 10:09:50 -04:00
parent c0f4069a9b
commit 45df729711
3 changed files with 115 additions and 93 deletions

View File

@ -127,7 +127,10 @@ public static class MauiProgram
{
try
{
File.Delete(Path.Combine(folder, file));
foreach (var path in Directory.EnumerateFiles(folder, Path.GetFileNameWithoutExtension(file) + ".*"))
{
File.Delete(path);
}
}
catch
{
@ -159,11 +162,6 @@ public static class MauiProgram
// save assembly to local folder
try
{
int subfolder = entry.FullName.IndexOf('/');
if (subfolder != -1 && !Directory.Exists(Path.Combine(folder, entry.FullName.Substring(0, subfolder))))
{
Directory.CreateDirectory(Path.Combine(folder, entry.FullName.Substring(0, subfolder)));
}
using var stream = File.Create(Path.Combine(folder, entry.FullName));
stream.Write(file, 0, file.Length);
}