From 73792348ffc60fbe5fb109afb61bb78c7888c6db Mon Sep 17 00:00:00 2001 From: "nikolaj.olsson" Date: Fri, 21 Feb 2020 07:41:13 +0100 Subject: [PATCH] Avoid multiple empty entries in "recent files" - thx OmrSi :) Related to #3991 --- libse/Settings.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libse/Settings.cs b/libse/Settings.cs index 85ef35e0c..6673dd36c 100644 --- a/libse/Settings.cs +++ b/libse/Settings.cs @@ -77,6 +77,11 @@ namespace Nikse.SubtitleEdit.Core public void Add(string fileName, string videoFileName, string originalFileName) { + if (string.IsNullOrEmpty(fileName)) + { + Files = Files.Where(p => !string.IsNullOrEmpty(p.FileName)).ToList(); + } + RecentFileEntry existingEntry; if (string.IsNullOrEmpty(originalFileName)) {