Check if icon exists before copying

pull/104/head
Brian Lima 2 years ago
parent faa6b36759
commit 11ee11274e

@ -542,7 +542,14 @@ namespace UWPHook
string dest_file = String.Join(String.Empty, icons_path, app.Aumid + Path.GetFileName(icon_to_copy));
try
{
File.Copy(icon_to_copy, dest_file, true);
if (File.Exists(icon_to_copy))
{
File.Copy(icon_to_copy, dest_file, true);
}
else
{
dest_file = app.Icon;
}
}
catch (System.IO.IOException e)
{

Loading…
Cancel
Save