From 11a2c9828cc5d182a0a3090af4ee7687eb997f57 Mon Sep 17 00:00:00 2001 From: Hannes von Haugwitz Date: Sat, 18 Nov 2017 09:00:27 +0100 Subject: [PATCH 02/20] Fix root_prefix option --- ChangeLog | 3 +++ src/db_disk.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14a3c72..43f84a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2017-11-18 Hannes von Haugwitz + * Fix root_prefix option + 2017-10-29 Hannes von Haugwitz * Fix short form of --limit parameter diff --git a/src/db_disk.c b/src/db_disk.c index 47e3e3e..36748e7 100644 --- a/src/db_disk.c +++ b/src/db_disk.c @@ -203,7 +203,7 @@ db_line *db_readline_disk () fullname=malloc((conf->root_prefix_length+2)*sizeof(char)); strncpy(fullname, conf->root_prefix, conf->root_prefix_length+1); strncat (fullname, "/", 1); - if (!get_file_status(&fullname[conf->root_prefix_length], &fs)) { + if (!get_file_status(fullname, &fs)) { add = check_rxtree (&fullname[conf->root_prefix_length], conf->tree, &attr, fs.st_mode); error (240, "%s match=%d, tree=%p, attr=%llu\n", &fullname[conf->root_prefix_length], add, conf->tree, attr); @@ -249,7 +249,7 @@ recursion: If not call, db_readline_disk again... */ - if (get_file_status(&fullname[conf->root_prefix_length], &fs)) { + if (get_file_status(fullname, &fs)) { free (fullname); goto recursion; } -- 2.19.1