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 (1)
......@@ -638,11 +638,8 @@ bool addfile(scfg_t* cfg, uint dirnum, file_t* f, const char* extdesc, client_t*
getfilepath(cfg, f, fpath);
if(f->from_ip == NULL)
file_client_hfields(f, client);
str_list_t list = list_archive_contents(fpath, /* pattern: */NULL
,(cfg->dir[dirnum]->misc & DIR_NOHASH) == 0, /* sort: */TRUE, /* error: */NULL, /* size: */0);
int result = smb_addfile_withlist(&smb, f, SMB_SELFPACK, extdesc, list, fpath);
int result = smb_addfile(&smb, f, SMB_SELFPACK, extdesc, /* contents: */NULL, fpath);
smb_close(&smb);
strListFree(&list);
return result == SMB_SUCCESS;
}
......
......@@ -1236,10 +1236,7 @@ js_add_file(JSContext *cx, uintN argc, jsval *arglist)
getfilepath(scfg, &file, fpath);
if(file.from_ip == NULL)
file_client_hfields(&file, client);
str_list_t list = list_archive_contents(fpath, /* pattern: */NULL
,(scfg->dir[file.dir]->misc & DIR_NOHASH) == 0, /* sort: */TRUE, /* error: */NULL, /* size: */0);
p->smb_result = smb_addfile_withlist(&p->smb, &file, SMB_SELFPACK, extdesc, list, fpath);
strListFree(&list);
p->smb_result = smb_addfile(&p->smb, &file, SMB_SELFPACK, extdesc, /* contents: */NULL, fpath);
JS_SET_RVAL(cx, arglist, BOOLEAN_TO_JSVAL(p->smb_result == SMB_SUCCESS));
}
JS_RESUMEREQUEST(cx, rc);
......@@ -1327,11 +1324,7 @@ js_update_file(JSContext *cx, uintN argc, jsval *arglist)
p->smb_result = smb_putfile(&p->smb, &file);
else {
if((p->smb_result = smb_removefile(&p->smb, &file)) == SMB_SUCCESS) {
str_list_t list = list_archive_contents(newfname, /* pattern: */NULL
,file.dir < scfg->total_dirs && (scfg->dir[file.dir]->misc & DIR_NOHASH) == 0
,/* sort: */TRUE, /* error: */NULL, /* size: */0);
p->smb_result = smb_addfile_withlist(&p->smb, &file, SMB_SELFPACK, extdesc, list, newfname);
strListFree(&list);
p->smb_result = smb_addfile(&p->smb, &file, SMB_SELFPACK, extdesc, /* contents: */NULL, newfname);
}
}
}
......
......@@ -660,10 +660,7 @@ bool upgrade_file_bases(bool hash)
if(*extdesc)
body = extdesc;
}
str_list_t list = list_archive_contents(fpath, /* pattern: */NULL
,(scfg.dir[i]->misc & DIR_NOHASH) == 0, /* sort: */TRUE, /* error: */NULL, /* size: */0);
result = smb_addfile_withlist(&smb, &file, SMB_FASTALLOC, body, list, fpath);
strListFree(&list);
result = smb_addfile(&smb, &file, SMB_FASTALLOC, body, /* contents: */NULL, fpath);
}
if(result != SMB_SUCCESS) {
fprintf(stderr, "\n!Error %d (%s) adding file to %s\n", result, smb.last_error, smb.file);
......