Try catch delete file

This commit is contained in:
Jaex 2022-01-05 09:43:21 +03:00
parent 3e94f4e0e8
commit 40861df084
2 changed files with 8 additions and 3 deletions

View file

@ -914,9 +914,8 @@ private void UpdateActionsMenu(string filePath)
string actionFilePath = action.GetFullPath();
tsmi.Image = actionsMenuIconCache.GetFileIconAsImage(actionFilePath);
}
catch (Exception e)
catch
{
DebugHelper.WriteException(e);
}
tsmi.Click += async (sender, e) => await action.RunAsync(filePath);

View file

@ -356,7 +356,13 @@ public void DeleteFiles()
{
if (!string.IsNullOrEmpty(filepath) && File.Exists(filepath))
{
FileSystem.DeleteFile(filepath, UIOption.OnlyErrorDialogs, RecycleOption.SendToRecycleBin);
try
{
FileSystem.DeleteFile(filepath, UIOption.OnlyErrorDialogs, RecycleOption.SendToRecycleBin);
}
catch
{
}
}
}
}