def safejoin(root, subpath):
    root = realpath(root)
    if not SAFENAME.match(subpath):
        raise BadName(u"unsafe path name: %r" % subpath)
    path = realpath(join(root, subpath))
    if commonprefix([root + sep, path]) != root + sep:
        raise BadName(u"invalid relative path: %r" % subpath)
    return path
Query for album data.
dataset/ETHPy150Open dimagi/commcare-hq/corehq/blobs/fsdb.py/safejoin--crossover with--dataset/ETHPy150Open YetAnotherNerd/whatlastgenre/wlg/dataprovider.py/Discogs.query_album