diff -r 28b14d2df6a1 -r be23a662d709 src/eric7/SystemUtilities/FileSystemUtilities.py --- a/src/eric7/SystemUtilities/FileSystemUtilities.py Sat Feb 10 11:28:58 2024 +0100 +++ b/src/eric7/SystemUtilities/FileSystemUtilities.py Sun Feb 11 18:35:44 2024 +0100 @@ -358,14 +358,18 @@ if f1 is None or f2 is None: return False - if followSymlinks: - if normcaseabspath(os.path.realpath(f1)) == normcaseabspath( - os.path.realpath(f2) - ): - return True + if isPlainFileName(f1) and isPlainFileName(f2): + if followSymlinks: + if normcaseabspath(os.path.realpath(f1)) == normcaseabspath( + os.path.realpath(f2) + ): + return True + else: + if normcaseabspath(f1) == normcaseabspath(f2): + return True + else: - if normcaseabspath(f1) == normcaseabspath(f2): - return True + return f1 == f2 return False @@ -388,14 +392,20 @@ if f1 is None or f2 is None: return False - if followSymlinks: - if normcaseabspath(os.path.dirname(os.path.realpath(f1))) == normcaseabspath( - os.path.dirname(os.path.realpath(f2)) - ): - return True + if isPlainFileName(f1) and isPlainFileName(f2): + if followSymlinks: + if normcaseabspath( + os.path.dirname(os.path.realpath(f1)) + ) == normcaseabspath(os.path.dirname(os.path.realpath(f2))): + return True + else: + if normcaseabspath(os.path.dirname(f1)) == normcaseabspath( + os.path.dirname(f2) + ): + return True + else: - if normcaseabspath(os.path.dirname(f1)) == normcaseabspath(os.path.dirname(f2)): - return True + return os.path.dirname(f1) == os.path.dirname(f2) return False