view tests/pathutil.py @ 550:6f216c1ab6b1

bake: Add a flag to know which record entries got collapsed from last run. This makes it possible to find entries for things that were actually baked during the current run, as opposed to skipped because they were "clean".
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 04 Aug 2015 21:22:30 -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