def targetMatches(targetPathParts, system, craft, target, camera):
    """
    Does the given target path match the given values?
    Where target path part is None, don't filter that value.
    eg if targetPathParts=[None,None,None,None], will always return True.
    """
    # targetPathParts = [s.title() for s in targetPathParts if s]
    matches = True
    if targetPathParts:
        pathSystem, pathCraft, pathTarget, pathCamera = targetPathParts
        if (pathSystem and pathSystem.title()!=system): matches = False
        if (pathCraft and pathCraft.title()!=craft): matches = False
        if (pathTarget and pathTarget.title()!=target): matches = False
        if (pathCamera and pathCamera.title()!=camera): matches = False
    return matches