diff options
| author | georg.brandl <devnull@localhost> | 2008-06-22 18:09:21 +0000 |
|---|---|---|
| committer | georg.brandl <devnull@localhost> | 2008-06-22 18:09:21 +0000 |
| commit | 970c57b9c932a66367a079d429bbd4b9aa064754 (patch) | |
| tree | fe15fd67fbaa11c11b8ba90ea109208e54f37043 | |
| parent | c5cc9bde7a94c60b2e6f9798b82e83075b4ac399 (diff) | |
| download | sphinx-970c57b9c932a66367a079d429bbd4b9aa064754.tar.gz | |
Remove target directories in the static path before copying them again.
| -rw-r--r-- | CHANGES | 2 | ||||
| -rw-r--r-- | sphinx/builder.py | 8 |
2 files changed, 6 insertions, 4 deletions
@@ -114,6 +114,8 @@ Bugs fixed * The LaTeX writer now translates line blocks with ``\raggedright``, which plays nicer with tables. +* Fix bug with directories in the HTML builder static path. + Release 0.3 (May 6, 2008) ========================= diff --git a/sphinx/builder.py b/sphinx/builder.py index 8ee11edd..b712dc86 100644 --- a/sphinx/builder.py +++ b/sphinx/builder.py @@ -574,12 +574,12 @@ class StandaloneHTMLBuilder(Builder): if filename.startswith('.'): continue fullname = path.join(staticdirname, filename) + targetname = path.join(self.outdir, '_static', filename) if path.isfile(fullname): - shutil.copyfile(fullname, - path.join(self.outdir, '_static', filename)) + shutil.copyfile(fullname, targetname) elif path.isdir(fullname): - shutil.copytree(fullname, - path.join(self.outdir, '_static', filename)) + shutil.rmtree(targetname) + shutil.copytree(fullname, targetname) # add pygments style file f = open(path.join(self.outdir, '_static', 'pygments.css'), 'w') f.write(PygmentsBridge('html', self.config.pygments_style).get_stylesheet()) |
