summaryrefslogtreecommitdiff
path: root/sphinx/builders/html.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-06-18 21:38:12 +0900
committerGitHub <noreply@github.com>2019-06-18 21:38:12 +0900
commit288bf231e68e327876510c9b39b16b7512718373 (patch)
tree184f59924565920fdccb32ca4549a570514f356e /sphinx/builders/html.py
parent3047bd211ff3de173d7af817d84118c8ad776772 (diff)
parent83c59bba6d5a7edcfb139a8218f6b3aa9a35c780 (diff)
downloadsphinx-git-288bf231e68e327876510c9b39b16b7512718373.tar.gz
Merge pull request #6501 from tk0miya/6499_html_logo_never_updated
Fix #6499: html: Sphinx never updates a copy of html_logo
Diffstat (limited to 'sphinx/builders/html.py')
-rw-r--r--sphinx/builders/html.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py
index c8d330d2d..147ac14a9 100644
--- a/sphinx/builders/html.py
+++ b/sphinx/builders/html.py
@@ -787,17 +787,11 @@ class StandaloneHTMLBuilder(Builder):
context=ctx, renderer=self.templates)
# copy logo and favicon files if not already in static path
if self.config.html_logo:
- logobase = path.basename(self.config.html_logo)
- logotarget = path.join(self.outdir, '_static', logobase)
- if not path.isfile(logotarget):
- copyfile(path.join(self.confdir, self.config.html_logo),
- logotarget)
+ entry = path.join(self.confdir, self.config.html_logo)
+ copy_asset(entry, path.join(self.outdir, '_static'))
if self.config.html_favicon:
- iconbase = path.basename(self.config.html_favicon)
- icontarget = path.join(self.outdir, '_static', iconbase)
- if not path.isfile(icontarget):
- copyfile(path.join(self.confdir, self.config.html_favicon),
- icontarget)
+ entry = path.join(self.confdir, self.config.html_favicon)
+ copy_asset(entry, path.join(self.outdir, '_static'))
logger.info(__('done'))
except OSError as err:
logger.warning(__('cannot copy static file %r'), err)