[PATCH 36/38] docs: sphinx-build-wrapper: don't allow "/" on file names
From: Mauro Carvalho Chehab
Date: Wed Feb 18 2026 - 05:31:29 EST
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@xxxxxxxxxx>
---
tools/docs/sphinx-build-wrapper | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/docs/sphinx-build-wrapper b/tools/docs/sphinx-build-wrapper
index ac6852e3dd8c..d4bb1175fe32 100755
--- a/tools/docs/sphinx-build-wrapper
+++ b/tools/docs/sphinx-build-wrapper
@@ -625,7 +625,8 @@ class SphinxBuilder:
# Use shlex here, as it handles well parameters with commas
args = shlex.split(line)
- fname = f"{output_dir}/{args[1]}.{args[2]}"
+ name = args[1].replace("/", " ")
+ fname = f"{output_dir}/{name}.{args[2]}"
if self.verbose:
print(f"Creating {fname}")
--
2.52.0