From e92be04edd123e40bab367be5ef6604fe1acbbd9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 10 Jan 2022 18:40:58 +0100 Subject: [PATCH] documentation/doxygen: adapt to different \dotfile handling in 1.9.3. --- documentation/doxygen.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/documentation/doxygen.py b/documentation/doxygen.py index f2b74dc7..d293940e 100755 --- a/documentation/doxygen.py +++ b/documentation/doxygen.py @@ -1052,7 +1052,12 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET. caption = None if i.tag == 'dotfile': if 'name' in i.attrib: - with open(i.attrib['name'], 'r') as f: + # Since 1.9.3, the file is copied to the XML output + # directory and name contains its relative path. Before + # that, the name was absolute, os.path.join() should do the + # right thing in both cases. + path = os.path.join(state.basedir, state.doxyfile['OUTPUT_DIRECTORY'], state.doxyfile['XML_OUTPUT'], i.attrib['name']) + with open(path, 'r') as f: source = f.read() # Since 1.8.16 the whole tag is dropped if the file # doesn't exist. Such a great solution that it's unfathomable. -- 2.30.2