Fixed a bug introduced by pathlib usage. eric7

Thu, 14 Jul 2022 10:18:45 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 14 Jul 2022 10:18:45 +0200
branch
eric7
changeset 9229
326810448a9c
parent 9228
3e8334a5bbcc
child 9230
70f269d529e4

Fixed a bug introduced by pathlib usage.

src/eric7/Utilities/__init__.py file | annotate | diff | comparison | revisions
--- 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