diff --git a/spyder/plugins/projects/projecttypes/__init__.py b/spyder/plugins/projects/projecttypes/__init__.py
index <HASH>..<HASH> 100644
--- a/spyder/plugins/projects/projecttypes/__init__.py
+++ b/spyder/plugins/projects/projecttypes/__init__.py
@@ -61,12 +61,16 @@ class BaseProject(object):
 
     def set_recent_files(self, recent_files):
         """Set a list of files opened by the project."""
-        for recent_file in recent_files[:]:
-            if not os.path.isfile(recent_file):
-                recent_files.remove(recent_file)
-        recent_files = [os.path.relpath(recent_file, self.root_path)
-                        for recent_file in recent_files]
-        files = list(OrderedDict.fromkeys(recent_files))
+        processed_recent_files = []
+        for recent_file in recent_files:
+            if os.path.isfile(recent_file):
+                try:
+                    relative_recent_file = os.path.relpath(
+                        recent_file, self.root_path)
+                    processed_recent_files.append(relative_recent_file)
+                except ValueError:
+                    processed_recent_files.append(recent_file)
+        files = list(OrderedDict.fromkeys(processed_recent_files))
         self.config.set('main', 'recent_files', files)
 
     def get_recent_files(self):
Projects: Handle relative paths for recent files on different mounts