# HG changeset patch # User Ben Artin # Date 1483428883 18000 # Node ID cc9593b9bcbf350b760dd6424bf7e6633ce82c80 # Parent 10c482d57c799b2cd175b8889fa1ab0611eee2be Land assets in the correct directory for pages with no pretty_urls override diff -r 10c482d57c79 -r cc9593b9bcbf piecrust/baking/single.py --- a/piecrust/baking/single.py Mon Jan 02 20:33:57 2017 -0500 +++ b/piecrust/baking/single.py Tue Jan 03 02:34:43 2017 -0500 @@ -84,7 +84,8 @@ # Get the URL and path for this sub-page. sub_uri = qualified_page.getUri(cur_sub) logger.debug("Baking '%s' [%d]..." % (sub_uri, cur_sub)) - out_path = self.getOutputPath(sub_uri, qualified_page.pretty_urls) + pretty_urls = qualified_page.pretty_urls if qualified_page.pretty_urls is not None else self.pretty_urls + out_path = self.getOutputPath(sub_uri, pretty_urls) # Create the sub-entry for the bake record. sub_entry = SubPageBakeInfo(sub_uri, out_path) @@ -157,7 +158,7 @@ # Copy page assets. if (cur_sub == 1 and self.copy_assets and sub_entry.anyPass(lambda p: p.used_assets)): - if qualified_page.pretty_urls: + if pretty_urls: out_assets_dir = os.path.dirname(out_path) else: out_assets_dir, out_name = os.path.split(out_path)