src/eric7/ViewManager/ViewManager.py

branch
eric7
changeset 10389
b432544fe075
parent 10388
a34ce7f42e8b
child 10394
056d1b2cd3c4
--- a/src/eric7/ViewManager/ViewManager.py	Wed Dec 06 14:23:36 2023 +0100
+++ b/src/eric7/ViewManager/ViewManager.py	Wed Dec 06 14:31:23 2023 +0100
@@ -7863,7 +7863,7 @@
         @param filePath path of the file to be added
         @type str
         """
-        if filePath:
+        if filePath and FileSystemUtilities.isPlainFileName(filePath):
             self.__watcher.addPath(filePath)
 
     def removeWatchedFilePath(self, filePath):
@@ -7873,7 +7873,10 @@
         @param filePath path of the file to be removed
         @type str
         """
-        if self.getOpenEditorCount(filePath) == 0:
+        if (
+            self.getOpenEditorCount(filePath) == 0
+            and FileSystemUtilities.isPlainFileName(filePath)
+        ):
             self.__watcher.removePath(filePath)
 
     ##################################################################

eric ide

mercurial