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)
......@@ -1073,8 +1073,15 @@ int sbbs_t::listfileinfo(uint dirnum, const char *filespec, long mode)
void sbbs_t::listfiletofile(file_t* f, FILE* fp)
{
char fname[13]; /* This is one of the only 8.3 filename formats left! (used for display purposes only) */
fprintf(fp, "%-*s %10lu %s\r\n", (int)sizeof(fname)-1, format_filename(f->name, fname, sizeof(fname)-1, /* pad: */TRUE)
,(ulong)getfilesize(&cfg, f), f->desc);
char bytes[32];
unsigned units = 1;
off_t size = getfilesize(&cfg, f);
do {
byte_estimate_to_str(size, bytes, sizeof(bytes), units, /* precision: */1);
units *= 1024;
} while(strlen(bytes) > 6 && units < 1024 * 1024 * 1024);
fprintf(fp, "%-*s %7s %s\r\n", (int)sizeof(fname)-1, format_filename(f->name, fname, sizeof(fname)-1, /* pad: */TRUE)
,bytes, (f->desc == NULL || *f->desc == '\0') ? f->name : f->desc);
}
int extdesclines(char *str)
......
......@@ -56,11 +56,12 @@ ulong sbbs_t::create_filelist(const char *name, long mode)
if(mode&FL_ULTIME) {
fprintf(fp, "New files since: %s\r\n", timestr(ns_time));
}
unsigned total_dirs = 0;
for(i=0; i < usrlibs ;i++)
total_dirs += usrdirs[i];
for(i=j=d=0;i<usrlibs;i++) {
for(j=0;j<usrdirs[i];j++,d++) {
outchar('.');
if(d && !(d%5))
bputs("\b\b\b\b\b \b\b\b\b\b");
progress(text[Scanning], d, total_dirs, 10);
if(mode&FL_ULTIME /* New-scan */
&& (cfg.lib[usrlib[i]]->offline_dir==usrdir[i][j]
|| cfg.dir[usrdir[i][j]]->misc&DIR_NOSCAN))
......@@ -73,6 +74,7 @@ ulong sbbs_t::create_filelist(const char *name, long mode)
if(j<usrdirs[i])
break;
}
progress(text[Done], d, total_dirs);
if(k>1) {
fprintf(fp,"\r\n%ld Files Listed.\r\n",k);
}
......