summaryrefslogtreecommitdiff
path: root/sphinx/builders/manpage.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/builders/manpage.py')
-rw-r--r--sphinx/builders/manpage.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/builders/manpage.py b/sphinx/builders/manpage.py
index 532d2b8fe..9d8fd5e67 100644
--- a/sphinx/builders/manpage.py
+++ b/sphinx/builders/manpage.py
@@ -79,8 +79,9 @@ class ManualPageBuilder(Builder):
docsettings.section = section
if self.config.man_make_section_directory:
- ensuredir(path.join(self.outdir, str(section)))
- targetname = '%s/%s.%s' % (section, name, section)
+ dirname = 'man%s' % section
+ ensuredir(path.join(self.outdir, dirname))
+ targetname = '%s/%s.%s' % (dirname, name, section)
else:
targetname = '%s.%s' % (name, section)