new option database-root
[adu.git] / create.c
index a5bd29810539e79a24d45fa6a287a0f644771e93..87b0b9a0198a471e0a5a886dbce84a09c49f4901 100644 (file)
--- a/create.c
+++ b/create.c
@@ -4,7 +4,7 @@
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
 
-/** \file create.c The create mode of adu. */
+/** \file create.c \brief The create mode of adu. */
 
 #include <dirent.h> /* readdir() */
 #include "format.h"
@@ -134,8 +134,6 @@ static int scan_dir(char *dirname, uint64_t *parent_dir_num)
                ret = create_user_table(uid, &ui);
                if (ret < 0)
                        goto out;
-               ui->bytes += size;
-               ui->files++;
                ret = update_user_row(ui->table, this_dir_num, &size);
                if (ret < 0)
                        goto out;
@@ -151,6 +149,11 @@ out:
        return ret;
 }
 
+/**
+ * The main function of the create mode.
+ *
+ * \return Standard.
+ */
 int com_create(void)
 {
        uint64_t zero = 0ULL;
@@ -172,6 +175,5 @@ int com_create(void)
                goto out;
        ret = write_uid_file();
 out:
-       close_all_tables();
        return ret;
 }