When copying html_static_path over theme it overwrites whole directories
Sphinx has config variable html_static_path which is a list of directories and files which should be overwriting the ones in the theme static directory.
I had files in theme/static/img/foo.jpg and wanted to add more files there from source/_static/img/bar.jpg so that the resulting _static dir would have all files. But that didn't happen. Instead the theme/static/img dir was completely overwritten with my source/_static/img dir.
I searched thru the code and found this:
Sphinx-1.0.5-py2.6.egg/sphinx/util/__init__.py: 158 else: 159 target = path.join(targetdir, path.basename(source)) 160 if path.exists(target): 161 shutil.rmtree(target) 162 shutil.copytree(source, target)
I can try to create a patch for this, if the current behavior is not by design and actually a bug.
I think the correct behavior should be to only handle files in the whole directory tree.