def strip_root(path_, root):
    """Strips root path from given file path."""

    if root[-1] != "/":
        root = root + "/"

    if path_.startswith(root):
        return path_[len(root) :]

    return path_