def parse_path(path):
    """Parse a path of /hash/action/my/path returning a tuple of
    ('hash', 'action', '/my/path') or None values if a shorter path is
    given.
    
    :param path: :py:class:`string`: the path
    :rtype: :py:func:`tuple`
    """
    if path == '/':
        return None, None, None
    paths = path[1:].split('/', 1)
    #Filter Empty strings
    paths = [p for p in paths if p != '']
    if len(paths) == 1:
        return paths[0], None, None
    else:
        file_hash, rest = paths
        paths = rest.split('/', 1)
        #Filter Empty strings
        paths = [p for p in paths if p != '']
        if len(paths) == 1:
            return file_hash, paths[0], None
        else:
            action, rest = paths
            return file_hash, action, rest