Skip to content

Commit

Permalink
Fix previous commmit :'(
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverRainZ committed Aug 19, 2023
1 parent 6e8d81e commit f6c4d6f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/sphinxnotes/lilypond/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,13 @@ def read_source_file(env:BuildEnvironment, fn:str) -> str:
# Source dir absolute path to file system absolute path.
#
# Since Sphinx 7.2, env.srcdir changes its type from str to pathlib.Path.
# See https://github.com/sphinx-doc/sphinx/pull/11526. TODO: use pathlib
fn = path.join(str(env.srcdir), fn)
# See https://github.com/sphinx-doc/sphinx/pull/11526.
#
# TODO: Use pathlib.Path.
#
# NOTE: CANNOT use path.join because fn is absolute.
# join('/foo', '/bar') finally get '/bar'.
fn = str(env.srcdir) + fn
else:
# Document relative path to file system absolute path.
fn = path.join(path.dirname(env.doc2path(env.docname)), fn)
Expand Down

0 comments on commit f6c4d6f

Please sign in to comment.