Index: spyder/utils/sourcecode.py
--- spyder/utils/sourcecode.py.orig
+++ spyder/utils/sourcecode.py
@@ -187,7 +187,7 @@ def differentiate_prefix(path_components0, path_compon
                 path_0 = path_0[longest_prefix_length:]
         elif not root_comparison:
             path_0 = common_elmt
-        elif sys.platform.startswith('linux') and path_0 == '':
+        elif sys.platform.startswith(('linux', 'openbsd')) and path_0 == '':
             path_0 = '/'
     return path_0
 
