From b3ee8598153b186ed3a68ca7f36896e8d83344e4 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Tue, 19 Jun 2007 18:49:29 +0000 Subject: [PATCH] Create all/newfiles listsings with long and short filenames --- ChangeLog | 3 ++- mbutils/mball.c | 15 ++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 697920d8..d00811ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,7 +20,8 @@ v0.91.9 16-May-2007 Improved cleaning users tmp dir after virus scan. mball: - Creates allfiles/newfiles listings with long filenames. + Creates allfiles/newfiles listings with long filenames and + short filenames. mbpasswd: Added check for FreeBSD > 6.0 and use sysctl for security check. diff --git a/mbutils/mball.c b/mbutils/mball.c index 16cc6ef6..bd899103 100644 --- a/mbutils/mball.c +++ b/mbutils/mball.c @@ -431,25 +431,30 @@ void Masterlist() if (!fdb.Deleted) { New = (((t_start - fdb.UploadDate) / 84400) <= CFG.newdays); - snprintf(temp, 81, "[%4d] %s %10u K %s", fdb.TimesDL, - StrDateDMY(fdb.UploadDate), fdb.Size / 1024, fdb.LName); + snprintf(temp, 81, "%s", fdb.LName); + WriteFiles(fp, fu, np, nu, New, temp); + + snprintf(temp, 81, "%-12s%10u K %s [%04d] Uploader: %s", + fdb.Name, (int)(fdb.Size / 1024), StrDateDMY(fdb.UploadDate), fdb.TimesDL, + strlen(fdb.Uploader)?fdb.Uploader:""); WriteFiles(fp, fu, np, nu, New, temp); for (z = 0; z < 25; z++) { if (strlen(fdb.Desc[z])) { if ((fdb.Desc[z][0] == '@') && (fdb.Desc[z][1] == 'X')) { - snprintf(temp, 81, " %s", fdb.Desc[z]+4); + snprintf(temp, 81, " %s", fdb.Desc[z]+4); } else { - snprintf(temp, 81, " %s", fdb.Desc[z]); + snprintf(temp, 81, " %s", fdb.Desc[z]); } WriteFiles(fp, fu, np, nu, New, temp); } } if (strlen(fdb.Magic)) { - snprintf(temp, 81, " Magic filerequest: %s", fdb.Magic); + snprintf(temp, 81, " Magic filerequest: %s", fdb.Magic); WriteFiles(fp, fu, np, nu, New, temp); } + WriteFiles(fp, fu, np, nu, New, (char *)""); } } }