Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commits (2)
  • Rob Swindell's avatar
    Remove tbz (tarred bzip) files from supported archive list · 04a41e14
    Rob Swindell authored
    Not supported by default on Windows and perhaps not on all *nix systems.
    You can still support creation of tbz files if you like, but you'll need to setup an external "Compressible File Type" in SCFG to do it.
    04a41e14
  • Rob Swindell's avatar
    Better error handling in QWK packet creation · 2245523d
    Rob Swindell authored
    If libarchive creates a 0-byte file or no file at all, then fall-through to the "temp file command-line" (if there is at least one Compressible File Type configured).
    
    If libarchive fails, there will still be a (hopefully helpful) error message logged, but at least the QWK packet may still get created.
    2245523d
......@@ -722,7 +722,7 @@ str_list_t directory(const char* path)
return list;
}
const char* supported_archive_formats[] = { "zip", "7z", "tgz", "tbz", NULL };
const char* supported_archive_formats[] = { "zip", "7z", "tgz", NULL };
// Returns negative on error
long create_archive(const char* archive, const char* format
,bool with_path, str_list_t file_list, char* error, size_t maxerrlen)
......
......@@ -727,6 +727,7 @@ bool sbbs_t::pack_qwk(char *packet, ulong *msgcnt, bool prepack)
/*******************/
/* Compress Packet */
/*******************/
remove(packet);
SAFEPRINTF2(path,"%s%s",cfg.temp_dir,ALLFILES);
if(strListFind((str_list_t)supported_archive_formats, useron.tmpext, /* case_sensitive */FALSE) >= 0) {
str_list_t file_list = directory(path);
......@@ -736,13 +737,15 @@ bool sbbs_t::pack_qwk(char *packet, ulong *msgcnt, bool prepack)
lprintf(LOG_ERR, "libarchive error (%s) creating %s", error, packet);
else
lprintf(LOG_INFO, "libarchive created %s from %ld files", packet, file_count);
} else {
}
if(flength(packet) < 1) {
remove(packet);
if((i = external(cmdstr(temp_cmd(),packet,path,NULL), ex|EX_WILDCARD)) != 0)
errormsg(WHERE,ERR_EXEC,cmdstr(temp_cmd(),packet,path,NULL),i);
}
if(!fexist(packet)) {
bputs(text[QWKCompressionFailed]);
return(false);
if(flength(packet) < 1) {
bputs(text[QWKCompressionFailed]);
return(false);
}
}
if(!prepack && useron.rest&FLAG('Q')) {
......