summaryrefslogtreecommitdiff
path: root/sphinx/builders/html.py
diff options
context:
space:
mode:
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 7c72ed785..5772d1cb0 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)