[PATCH 04/11] docs: sphinx-build-wrapper: don't allow "/" on file names

Mauro Carvalho Chehab posted 11 patches 1 month ago
There is a newer version of this series
[PATCH 04/11] docs: sphinx-build-wrapper: don't allow "/" on file names
Posted by Mauro Carvalho Chehab 1 month ago
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>
---
 tools/docs/sphinx-build-wrapper | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/docs/sphinx-build-wrapper b/tools/docs/sphinx-build-wrapper
index e6418e22e2ff..4572328e379d 100755
--- a/tools/docs/sphinx-build-wrapper
+++ b/tools/docs/sphinx-build-wrapper
@@ -625,6 +625,7 @@ class SphinxBuilder:
 
                 # Use shlex here, as it handles well parameters with commas
                 args = shlex.split(line)
+                name = args[1].replace("/", " ")
                 fname = f"{output_dir}/{args[3]}.{args[2]}"
 
                 if self.verbose:
-- 
2.52.0