def _pathjoin(a, b):
    """
    POSIX-like path join for Globus Transfer paths

    As with _normpath above, this is meant to behave correctly even on Windows systems
    """
    if not b:  # given "" as a file path
        return a
    elif b.startswith("/"):  # a path starting with / is absolute
        return b

    if a.endswith("/"):
        return a + b
    else:
        return a + "/" + b