mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-29 17:02:05 +13:00
Try catch delete file
This commit is contained in:
parent
3e94f4e0e8
commit
40861df084
2 changed files with 8 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue