From 0fe8bca6a7da930196686d23dc1cf4a4a68f306c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Marchal?= Date: Tue, 18 May 2010 07:12:48 +0000 Subject: [PATCH] Fix the creation of a report for only one user with command line option -u --- index.c | 2 +- util.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/index.c b/index.c index 1767099..ae96dc5 100644 --- a/index.c +++ b/index.c @@ -287,7 +287,7 @@ static void make_date_index(void) static void make_file_index(void) { #define MAX_CREATION_DATE 15 - #define MAX_DIR_NAME 30 + #define MAX_DIR_NAME 128 FILE *fp_ou; DIR *dirp; struct dirent *direntp; diff --git a/util.c b/util.c index b602064..8a3dccc 100644 --- a/util.c +++ b/util.c @@ -1012,8 +1012,11 @@ int vrfydir(const struct periodstruct *per1, const char *addr, const char *site, } if(us[0] != '\0') { - strcat(wdir,"-"); - strcat(wdir,us); + struct userinfostruct *uinfo=userinfo_find_from_id(us); + if (uinfo) { + strcat(wdir,"-"); + strcat(wdir,uinfo->filename); + } } if(addr[0] != '\0') { strcat(wdir,"-"); -- 2.47.2