From: Frédéric Marchal Date: Tue, 18 May 2010 07:12:48 +0000 (+0000) Subject: Fix the creation of a report for only one user with command line option -u X-Git-Tag: v2.3-pre5~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0fe8bca6a7da930196686d23dc1cf4a4a68f306c;p=thirdparty%2Fsarg.git Fix the creation of a report for only one user with command line option -u --- 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,"-");