diff options
author | Magnus Hagander | 2017-08-15 17:28:48 +0000 |
---|---|---|
committer | Magnus Hagander | 2017-08-15 17:28:48 +0000 |
commit | 91d826fe484b7b3ee82923680fe2be39f66d0db7 (patch) | |
tree | 7aa9ce6b90545158eb3b23d56e145a0d27b68b08 /tools/deploystatic/deploystatic.py | |
parent | b0dcc0172e56ed45ff73736bea7a8d2a472d7354 (diff) |
Don't strip the templates/ prefix of target directory
It's actually used in the rendering code.
Diffstat (limited to 'tools/deploystatic/deploystatic.py')
-rwxr-xr-x | tools/deploystatic/deploystatic.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tools/deploystatic/deploystatic.py b/tools/deploystatic/deploystatic.py index ec683242..744567cd 100755 --- a/tools/deploystatic/deploystatic.py +++ b/tools/deploystatic/deploystatic.py @@ -245,16 +245,13 @@ if __name__ == "__main__": for relpath, relname in source.walkfiles('templates'): if relpath == 'templates/pages': continue - # Remove templates/ prefix, since it will always be there - destrelpath = relpath[len('templates/'):] - - if not os.path.isdir(os.path.join(args.destpath, destrelpath)): - os.makedirs(os.path.join(args.destpath, destrelpath)) + if not os.path.isdir(os.path.join(args.destpath, relpath)): + os.makedirs(os.path.join(args.destpath, relpath)) relsource = os.path.join(relpath, relname) - source.copy_if_changed(relsource, os.path.join(args.destpath, destrelpath, relname)) + source.copy_if_changed(relsource, os.path.join(args.destpath, relsource)) - knownfiles.append(os.path.join(destrelpath, relname)) + knownfiles.append(relsource) # Look for things to remove for dn, subdirs, filenames in os.walk(args.destpath): |