summaryrefslogtreecommitdiff
path: root/tools/docs
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2026-03-06 16:45:40 +0100
committerJonathan Corbet <corbet@lwn.net>2026-03-09 10:34:38 -0600
commit0e4c8adad4cacf699672d28e19143dc0b9d145fd (patch)
tree13764c48c6e0ace535d9051dfd51ac48dab9fc3c /tools/docs
parent5828d3564729e61306456fae02e9d0dc9f2e772d (diff)
docs: sphinx-build-wrapper: don't allow "/" on file names
When handling "DOC:" sections, slash characters may be there. Prevent using it at the file names, as this is used for directory separator. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <c1a83a50b0659a5bcf68ef14f9457cc188e91e3a.1772810752.git.mchehab+huawei@kernel.org>
Diffstat (limited to 'tools/docs')
-rwxr-xr-xtools/docs/sphinx-build-wrapper4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/docs/sphinx-build-wrapper b/tools/docs/sphinx-build-wrapper
index e6418e22e2ff..d3f0dba13da1 100755
--- a/tools/docs/sphinx-build-wrapper
+++ b/tools/docs/sphinx-build-wrapper
@@ -625,7 +625,9 @@ class SphinxBuilder:
# Use shlex here, as it handles well parameters with commas
args = shlex.split(line)
- fname = f"{output_dir}/{args[3]}.{args[2]}"
+ fname = f"{args[3]}.{args[2]}"
+ fname = fname.replace("/", " ")
+ fname = f"{output_dir}/{fname}"
if self.verbose:
print(f"Creating {fname}")