summaryrefslogtreecommitdiff
path: root/trashsys.c
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-06-30 13:13:10 +0200
committerOskar <[email protected]>2024-06-30 13:13:10 +0200
commit2d664cc4e151f03053982d3075239bfa1aaea41e (patch)
tree189c9aab1eb5290a3d4400329a8dade30e194a2d /trashsys.c
parente570b7047c81810a947daa1929485ac7a5f571e4 (diff)
fixed bug where ID starts at 2 if log directory is empty
Diffstat (limited to 'trashsys.c')
-rw-r--r--trashsys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/trashsys.c b/trashsys.c
index f8d081f..77156a4 100644
--- a/trashsys.c
+++ b/trashsys.c
@@ -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) {