def check_include_legal(abs_dir, abs_target, include):
    path = os.path.normpath(os.path.join(abs_dir, abs_target, include))
    if not path.startswith(abs_dir):
        raise Exception(_("Illegal include '%(include)s' -> '%(path)s'") % {'include': include, 'path': path})
    return True
dataset/ETHPy150Open pebble/cloudpebble/ide/utils/prepreprocessor.py/check_include_legal/original