# HG changeset patch # User Julien Cristau # Date 1381392149 -7200 # Node ID 8ab0e601d418ef6cca133b8a48e934c66683afb1 # Parent f7a738afc295087b3459e9049c7346ce6d9ab50d [web] don't rename resources in gen-static-datadir We should use the result from WebConfiguration.locate_resource to know which file to copy, not what name to copy it to. The destination file should be the name of the resource, as the client will request it. This matters in the case of cubicweb.css which locate_resource might rewrite to cubicweb.old.css. Closes #3206129 diff -r f7a738afc295 -r 8ab0e601d418 web/webctl.py --- a/web/webctl.py Wed Oct 23 14:18:58 2013 +0200 +++ b/web/webctl.py Thu Oct 10 10:02:29 2013 +0200 @@ -87,10 +87,10 @@ resources.update(osp.join(rel_dirpath, f) for f in filenames) # locate resources and copy them to destination for resource in resources: - dirname = osp.dirname(resource) - dest_resource = osp.join(dest, dirname) - if not osp.isdir(dest_resource): - os.makedirs(dest_resource) + dest_resource = osp.join(dest, resource) + dirname = osp.dirname(dest_resource) + if not osp.isdir(dirname): + os.makedirs(dirname) resource_dir, resource_path = config.locate_resource(resource) copy(osp.join(resource_dir, resource_path), dest_resource) # handle md5 version subdirectory