From 2eec5eb675a1da0c7332387603ccd3c95c8ff3fe Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Fri, 24 Jun 2011 20:47:22 +0200 Subject: [PATCH] In move prints the old name before deallocating it. --- scan.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scan.c b/scan.c index 8bef435c..0bd4befd 100644 --- a/scan.c +++ b/scan.c @@ -187,10 +187,6 @@ static void scan_file(struct snapraid_scan* scan, struct snapraid_state* state, } } - /* remove it */ - ++scan->count_change; - scan_file_remove(state, disk, file); - if (state->gui) { fprintf(stderr, "scan:change:%s:%s\n", disk->name, file->sub); fflush(stderr); @@ -199,6 +195,10 @@ static void scan_file(struct snapraid_scan* scan, struct snapraid_state* state, printf("Change '%s/%s'\n", disk->name, file->sub); } + /* remove it */ + ++scan->count_change; + scan_file_remove(state, disk, file); + /* and continue to reinsert it */ } }