INNER CODE UNIT · C

len

clover-moe/spearmint · code/autoupdater/autoupdater.c:494

    const size_t len = strlen(AUTOUPDATE_URL) + strlen(from) + 1;
    char *fullurl = (char *) alloca(len);
    if (!fullurl) {
        outOfMemory();
    }
    snprintf(fullurl, len, "%s%s", AUTOUPDATE_URL, from);

    infof("Downloading from '%s' to '%s'", fullurl, to);

    buildParentDirs(to);
    io = fopen(to, "wb");
    if (!io) {
        die("Failed to open output file");
    }

    if (!runHttpDownload(fullurl, io)) {
        fclose(io);
        remove(to);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…