diff -r 6156d9675f62 -r ea35c92a3c7c src/eric7/ViewManager/ViewManager.py --- a/src/eric7/ViewManager/ViewManager.py Mon Feb 19 19:37:00 2024 +0100 +++ b/src/eric7/ViewManager/ViewManager.py Thu Feb 22 16:26:46 2024 +0100 @@ -149,7 +149,7 @@ self.__watcher = QFileSystemWatcher(self) self.__watcher.fileChanged.connect(self.__watchedFileChanged) - def setReferences(self, ui, dbs): + def setReferences(self, ui, dbs, remoteServerInterface): """ Public method to set some references needed later on. @@ -157,11 +157,16 @@ @type UserInterface @param dbs reference to the debug server object @type DebugServer + @param remoteServerInterface reference to the 'eric-ide' server interface + @type EricServerInterface """ from eric7.QScintilla.SearchReplaceWidget import SearchReplaceSlidingWidget self.ui = ui self.dbs = dbs + self.__remotefsInterface = remoteServerInterface.getServiceInterface( + "FileSystem" + ) self.__searchReplaceWidget = SearchReplaceSlidingWidget(self, ui) @@ -6114,9 +6119,15 @@ filenames = [] for editor in self.editors: fn = editor.getFileName() - if fn is not None and fn not in filenames and os.path.exists(fn): + if fn is not None and fn not in filenames: # only return names of existing files - filenames.append(fn) + exists = ( + self.__remotefsInterface.exists(fn) + if FileSystemUtilities.isRemoteFileName(fn) + else os.path.exists(fn) + ) + if exists: + filenames.append(fn) return filenames