Skip to content
Snippets Groups Projects
Commit f4fd10ea authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

if dirname is empty, don't add a path separator

parent 1fb876b3
No related branches found
No related tags found
No related merge requests found
...@@ -34,6 +34,7 @@ def path(dirname, inp): ...@@ -34,6 +34,7 @@ def path(dirname, inp):
# dirname is a directory, can be empty # dirname is a directory, can be empty
# inp is an optional file or subdirectory name # inp is an optional file or subdirectory name
# returns the path to 'inp' in the same directory as 'ref' # returns the path to 'inp' in the same directory as 'ref'
if dirname:
dirname = os.path.dirname(dirname + os.sep) dirname = os.path.dirname(dirname + os.sep)
if not inp: if not inp:
return dirname return dirname
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment