mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Ignore errors in update recent files for missing files
This commit is contained in:
parent
6983acaefa
commit
ae09489ac4
@ -3540,16 +3540,23 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
return;
|
||||
}
|
||||
|
||||
Configuration.Settings.RecentFiles.Files = Configuration.Settings.RecentFiles.Files
|
||||
.Where(p => !notExistingFiles.Contains(p.FileName)).ToList();
|
||||
for (var index = reopenToolStripMenuItem.DropDownItems.Count - 1; index >= 0; index--)
|
||||
try
|
||||
{
|
||||
ToolStripItem item = reopenToolStripMenuItem.DropDownItems[index];
|
||||
if (notExistingFiles.Contains((string)item.Tag))
|
||||
Configuration.Settings.RecentFiles.Files = Configuration.Settings.RecentFiles.Files
|
||||
.Where(p => !notExistingFiles.Contains(p.FileName)).ToList();
|
||||
for (var index = reopenToolStripMenuItem.DropDownItems.Count - 1; index >= 0; index--)
|
||||
{
|
||||
reopenToolStripMenuItem.DropDownItems.RemoveAt(index);
|
||||
ToolStripItem item = reopenToolStripMenuItem.DropDownItems[index];
|
||||
if (notExistingFiles.Contains((string)item.Tag))
|
||||
{
|
||||
reopenToolStripMenuItem.DropDownItems.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
};
|
||||
bw.RunWorkerAsync(Configuration.Settings.RecentFiles.Files);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user