[meld] recent: Don't complain if a file is missing when trying to delete it



commit de005041eb3b787afab87d9c59a92b6d11a311e9
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sat Sep 27 06:27:28 2014 +1000

    recent: Don't complain if a file is missing when trying to delete it

 meld/recent.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/meld/recent.py b/meld/recent.py
index 42a5fbd..3aa0058 100644
--- a/meld/recent.py
+++ b/meld/recent.py
@@ -187,7 +187,10 @@ class RecentFiles(object):
         for path in stored:
             file_path = os.path.abspath(os.path.join(self.recent_path, path))
             if file_path not in item_paths:
-                os.remove(file_path)
+                try:
+                    os.remove(file_path)
+                except OSError:
+                    pass
 
     def _update_recent_files(self, *args):
         meld_items = self._filter_items(self.recent_filter,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]