From: Mauro Carvalho Chehab Date: Fri, 6 Mar 2026 15:45:40 +0000 (+0100) Subject: docs: sphinx-build-wrapper: don't allow "/" on file names X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0e4c8adad4cacf699672d28e19143dc0b9d145fd;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Jonathan Corbet Message-ID: --- diff --git a/tools/docs/sphinx-build-wrapper b/tools/docs/sphinx-build-wrapper index e6418e22e2ff3..d3f0dba13da1b 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}")