mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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>
This commit is contained in:
parent
5828d35647
commit
0e4c8adad4
|
|
@ -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}")
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user