Fix user summary accounting if pattern is given.
[adu.git] / select.c
index df68b67..15ad707 100644 (file)
--- a/select.c
+++ b/select.c
@@ -436,6 +436,7 @@ static int print_global_summary(struct format_info *fi)
        return output("%s", select_conf.trailer_arg);
 }
 
        return output("%s", select_conf.trailer_arg);
 }
 
+/* row: a pointer to a row of the *user* table */
 static int user_summary_loop_function(struct osl_row *row, void *data)
 {
        struct user_summary_info *usi = data;
 static int user_summary_loop_function(struct osl_row *row, void *data)
 {
        struct user_summary_info *usi = data;
@@ -444,7 +445,7 @@ static int user_summary_loop_function(struct osl_row *row, void *data)
 
        if (usi->preg) {
                char *dirname;
 
        if (usi->preg) {
                char *dirname;
-               ret = get_dir_name_of_row(row, &dirname);
+               ret = get_dir_name_of_user_row(row, usi->ui, &dirname);
                if (ret < 0)
                        goto err;
                ret = dir_is_admissible(dirname, usi->preg, usi->inverse_matching);
                if (ret < 0)
                        goto err;
                ret = dir_is_admissible(dirname, usi->preg, usi->inverse_matching);