Commits

georg.brandl  committed aad906f

Remove target directories in the static path before copying them again.

  • Participants
  • Parent commits bf08f24

Comments (0)

Files changed (2)

 * 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)
 =========================

File sphinx/builder.py

                 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())