view tests/pathutil.py @ 472:dc78ade3f320

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.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 14 Jul 2015 23:41:25 -0700
parents a2d283d1033d
children
line wrap: on
line source

import os


def slashfix(path):
    if path is None:
        return None
    if isinstance(path, str):
        return path.replace('/', os.sep)
    fixed = []
    for p in path:
        fixed.append(p.replace('/', os.sep))
    return fixed