Commits (1)
  • Rob Swindell's avatar
    Disable libarchive support for creating/appending bundles · 55962a41
    Rob Swindell authored
    libarchive apparently cannot be used for in-place modification of (e.g. adding files to) existing archives, so if a bundle already exists, this code would over-write it with a new archive containing just the latest packet. Issue reported by acn (IMZADI) via DOVE-Net.
    
    I could and might create an update_archive() function which extracts and re-creates an archive with additional files, but since I don't have that yet, just disable this for now and always use an external archive utility to create or update bundles (so again, an "Archive" configuration is required in your sbbsecho.ini file, which you most likely already have).
    55962a41
......@@ -2328,12 +2328,14 @@ int pack(const char *srcfile, const char *destfile, fidoaddr_t dest)
lprintf(LOG_DEBUG,"Packing packet (%s) into bundle (%s) for %s using %s"
,srcfile, destfile, smb_faddrtoa(&dest, NULL), archive->name);
#if 0 // libarchive apparently cannot be used for in-place modification of (e.g. adding files to) existing archives
if(strListFind((str_list_t)supported_archive_formats, archive->name, /* case_sensitive */FALSE) >= 0) {
const char* file_list[] = { srcfile, NULL };
if(create_archive(destfile, archive->name, /* with_path: */false, (str_list_t)file_list, tmp, sizeof(tmp)) == 1)
return 0;
lprintf(LOG_ERR, "libarchive error (%s) creating %s", tmp, destfile);
}
#endif
return execute(cmdstr(&scfg, /* user: */NULL, archive->pack, destfile, srcfile, tmp, sizeof(tmp)));
}
......