src/eric7/Utilities/__init__.py

branch
eric7
changeset 9229
326810448a9c
parent 9221
bf71ee032bb4
child 9264
18a7312cfdb3
child 9413
80c06d472826
--- a/src/eric7/Utilities/__init__.py	Wed Jul 13 16:22:49 2022 +0200
+++ b/src/eric7/Utilities/__init__.py	Thu Jul 14 10:18:45 2022 +0200
@@ -800,7 +800,7 @@
     @return path with converted separator characters
     @rtype str
     """
-    return str(pathlib.PurePath(path))
+    return str(pathlib.PurePath(path)) if bool(path) else ""
 
 
 def fromNativeSeparators(path):
@@ -812,7 +812,7 @@
     @return path with converted separator characters
     @rtype str
     """
-    return pathlib.PurePath(path).as_posix()
+    return pathlib.PurePath(path).as_posix() if bool(path) else ""
 
 
 def normcasepath(path):

eric ide

mercurial