Skip to content

Commit

Permalink
Normalise paths in Breathe config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtv committed May 1, 2024
1 parent 3ce6a93 commit 3952888
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@

def recursive_dir(path, relative_to):
"""List all files in `path`, as relative paths from `relative_to`."""
path = os.path.normpath(path)
relative_to = os.path.normpath(relative_to)
files = []
for dirpath, _, filenames in os.walk(path):
if dirpath == path:
reldir = ''
else:
reldir = os.path.relpath(dirpath, relative_to)
for filename in filenames:
for filename in sorted(filenames):
filename = os.path.normpath(filename)
if not filename.startswith('.'):
files.append(os.path.join(reldir, filename))
return files
Expand Down

0 comments on commit 3952888

Please sign in to comment.