mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-23 03:33:18 +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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Configuration.Settings.RecentFiles.Files = Configuration.Settings.RecentFiles.Files
|
try
|
||||||
.Where(p => !notExistingFiles.Contains(p.FileName)).ToList();
|
|
||||||
for (var index = reopenToolStripMenuItem.DropDownItems.Count - 1; index >= 0; index--)
|
|
||||||
{
|
{
|
||||||
ToolStripItem item = reopenToolStripMenuItem.DropDownItems[index];
|
Configuration.Settings.RecentFiles.Files = Configuration.Settings.RecentFiles.Files
|
||||||
if (notExistingFiles.Contains((string)item.Tag))
|
.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);
|
bw.RunWorkerAsync(Configuration.Settings.RecentFiles.Files);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user