forked from github/pelican
Make THEME_STATIC_PATHS work for files as well.
The test passes now.
This commit is contained in:
parent
19a9eeb975
commit
430868e859
1 changed files with 13 additions and 6 deletions
|
|
@ -696,14 +696,21 @@ class StaticGenerator(Generator):
|
||||||
final_path=None):
|
final_path=None):
|
||||||
"""Copy all the paths from source to destination"""
|
"""Copy all the paths from source to destination"""
|
||||||
for path in paths:
|
for path in paths:
|
||||||
|
source_path = os.path.join(source, path)
|
||||||
|
|
||||||
if final_path:
|
if final_path:
|
||||||
copy(os.path.join(source, path),
|
if os.path.isfile(source_path):
|
||||||
os.path.join(output_path, destination, final_path),
|
destination_path = os.path.join(output_path, destination,
|
||||||
self.settings['IGNORE_FILES'])
|
final_path,
|
||||||
|
os.path.basename(path))
|
||||||
|
else:
|
||||||
|
destination_path = os.path.join(output_path, destination,
|
||||||
|
final_path)
|
||||||
else:
|
else:
|
||||||
copy(os.path.join(source, path),
|
destination_path = os.path.join(output_path, destination, path)
|
||||||
os.path.join(output_path, destination, path),
|
|
||||||
self.settings['IGNORE_FILES'])
|
copy(source_path, destination_path,
|
||||||
|
self.settings['IGNORE_FILES'])
|
||||||
|
|
||||||
def _file_update_required(self, staticfile):
|
def _file_update_required(self, staticfile):
|
||||||
source_path = os.path.join(self.path, staticfile.source_path)
|
source_path = os.path.join(self.path, staticfile.source_path)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue