INNER CODE UNIT · C

path_is_deb_file

witchan/ios-mcp · mcp-root/main.c:188

static int path_is_deb_file(const char *path) {
    char resolvedPath[PATH_MAX];
    struct stat st;
    int fd;
    char header[8];
    ssize_t bytesRead;

    if (!path || path[0] != '/') {
        fprintf(stderr, "dpkg package path must be absolute: %s\n", path ? path : "(null)");
        return 0;
    }

    if (!path_has_deb_extension(path)) {
        fprintf(stderr, "dpkg package path must end with .deb: %s\n", path);
        return 0;
    }

    if (!canonicalize_existing_bootstrap_path(path, resolvedPath, sizeof(resolvedPath))) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…