# HG changeset patch # User Ludovic Chabant # Date 1436942485 25200 # Node ID dc78ade3f320c7a492a4d0813536b1e8d01be77b # Parent 5b57a189fd98409b0dbfdf3ad3c86fced87b93e0 bug: Fix copying of page assets during the bake. * The `Assetor` wasn't setting the "used assets" flag on the correct object. (I wonder why Python didn't complain about that) * The baker wasn't looking at the right input filename. diff -r 5b57a189fd98 -r dc78ade3f320 piecrust/baking/single.py --- a/piecrust/baking/single.py Tue Jul 14 23:13:16 2015 -0700 +++ b/piecrust/baking/single.py Tue Jul 14 23:41:25 2015 -0700 @@ -136,11 +136,10 @@ logger.debug("Copying page assets to: %s" % out_assets_dir) _ensure_dir_exists(out_assets_dir) - page_dirname = os.path.dirname(qualified_page.path) page_pathname, _ = os.path.splitext(qualified_page.path) in_assets_dir = page_pathname + ASSET_DIR_SUFFIX for fn in os.listdir(in_assets_dir): - full_fn = os.path.join(page_dirname, fn) + full_fn = os.path.join(in_assets_dir, fn) if os.path.isfile(full_fn): dest_ap = os.path.join(out_assets_dir, fn) logger.debug(" %s -> %s" % (full_fn, dest_ap)) diff -r 5b57a189fd98 -r dc78ade3f320 piecrust/data/assetor.py --- a/piecrust/data/assetor.py Tue Jul 14 23:13:16 2015 -0700 +++ b/piecrust/data/assetor.py Tue Jul 14 23:41:25 2015 -0700 @@ -91,5 +91,5 @@ cpi = self._page.app.env.exec_info_stack.current_page_info if cpi is not None: - cpi.render_ctx.used_assets = True + cpi.render_ctx.current_pass_info.used_assets = True