From 1f7a8bde6406457217f18afc85bed4e3cbab286e Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 18 Jan 2013 23:39:19 -0300 Subject: [PATCH] Include only existent files in RecentFiles list --- src/recent_files.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/recent_files.cpp b/src/recent_files.cpp index 182025082..8f42763b5 100644 --- a/src/recent_files.cpp +++ b/src/recent_files.cpp @@ -21,6 +21,7 @@ #include "recent_files.h" #include "app_menus.h" +#include "base/fs.h" #include "base/path.h" #include "ini_file.h" @@ -38,7 +39,7 @@ RecentFiles::RecentFiles() sprintf(buf, "Filename%02d", c); const char* filename = get_config_string("RecentFiles", buf, NULL); - if (filename && *filename) + if (filename && *filename && base::file_exists(filename)) m_files.addItem(filename); }