]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Fix the creation of a report for only one user with command line option -u
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Tue, 18 May 2010 07:12:48 +0000 (07:12 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Tue, 18 May 2010 07:12:48 +0000 (07:12 +0000)
index.c
util.c

diff --git a/index.c b/index.c
index 17670996524623169e663784d6ab4ff7c5b03cf8..ae96dc547470196a126722cc597ad4f6c15adf4f 100644 (file)
--- 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 b6020643a7fd6fa5bd2298950bbdcf6337ad4b7f..8a3dccc87726d47c299b10dbdda086fa50cd4b98 100644 (file)
--- 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,"-");