Make user.c independent of command line options.
[adu.git] / create.c
index 87b0b9a..2925d57 100644 (file)
--- a/create.c
+++ b/create.c
@@ -131,7 +131,7 @@ static int scan_dir(char *dirname, uint64_t *parent_dir_num)
                dir_size += size;
                dir_files++;
                uid = s.st_uid;
-               ret = create_user_table(uid, &ui);
+               ret = create_user_table(conf.database_dir_arg, uid, &ui);
                if (ret < 0)
                        goto out;
                ret = update_user_row(ui->table, this_dir_num, &size);
@@ -173,7 +173,7 @@ int com_create(void)
        ret = scan_dir(conf.base_dir_arg, &zero);
        if (ret < 0)
                goto out;
-       ret = write_uid_file();
+       ret = write_uid_file(conf.database_dir_arg);
 out:
        return ret;
 }