mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fix utils.copy behaviour
Previously, the copy util failed if only a directory containing only files was specified in THEME_STATIC_PATHS
This commit is contained in:
parent
9935286e19
commit
e03cf3f517
2 changed files with 18 additions and 0 deletions
|
|
@ -273,6 +273,9 @@ def copy(path, source, destination, destination_path=None):
|
|||
destination_ = os.path.abspath(
|
||||
os.path.expanduser(os.path.join(destination, destination_path)))
|
||||
|
||||
if not os.path.exists(destination_):
|
||||
os.makedirs(destination_)
|
||||
|
||||
def recurse(source, destination):
|
||||
for entry in os.listdir(source):
|
||||
entry_path = os.path.join(source, entry)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue