diff options
author | Oskar <[email protected]> | 2024-06-30 13:13:10 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-06-30 13:13:10 +0200 |
commit | 2d664cc4e151f03053982d3075239bfa1aaea41e (patch) | |
tree | 189c9aab1eb5290a3d4400329a8dade30e194a2d /trashsys.c | |
parent | e570b7047c81810a947daa1929485ac7a5f571e4 (diff) |
fixed bug where ID starts at 2 if log directory is empty
Diffstat (limited to 'trashsys.c')
-rw-r--r-- | trashsys.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -251,7 +251,7 @@ int check_create_ts_dirs(struct initial_path_info *ipi) { // 1. Check if trashsy uint64_t find_highest_id (struct initial_path_info *ipi) { // Find highest id and then return it, because we will create the new log entry as highestID + 1 // We need to check whether a file is a directory or just a file. - uint64_t id = 1; + uint64_t id = 0; struct dirent *ddd; DIR *dir = opendir(ipi->ts_path_log); if (dir == NULL) { |