diff options
| author | Tristan Riehs <tristan.riehs@inria.fr> | 2025-12-25 13:03:07 +0100 |
|---|---|---|
| committer | Tristan Riehs <tristan.riehs@inria.fr> | 2025-12-25 13:03:07 +0100 |
| commit | 1876340763364998f45015bcfa6ee755eeef46bf (patch) | |
| tree | ff8a5e1c0ce8d641dd73d5b41678044c51832678 /src/main.c | |
| parent | 73be01623bc2b1cb1618d283fff07fe96cd87499 (diff) | |
Increment file table id from ftag_add_one_file
I don't remember the reason for doing this but there is one.
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -312,6 +312,7 @@ static void ftag_add_one_file(sqlite3 *db, next_id, canonical_name, full_name, description, date); rc = sqlite3_exec(db, sql, NULL, NULL, NULL); sqlite3_check(rc, db); + (*next_id)++; char new_path[512]; memset(new_path, 0, sizeof(new_path)); @@ -361,8 +362,7 @@ static void ftag_file_add(int argc, char **argv) sqlite3_check(rc, db); int next_id = table_next_id(db, "files"); for (int i = 0; i < argc; i++) { - ftag_add_one_file(db, next_id, argv[i]); - next_id++; + ftag_add_one_file(db, &next_id, argv[i]); } sqlite3_close(db); } |
