From b53647c07cf58ed2a8b76727f22cf5328c6e02fb Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Thu, 6 Dec 2018 08:30:25 +0000 Subject: [PATCH] fix sql in config file handler --- zpm-syncfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zpm-syncfs.c b/zpm-syncfs.c index beff560..18d0542 100644 --- a/zpm-syncfs.c +++ b/zpm-syncfs.c @@ -229,6 +229,7 @@ static char *column(char *col, int ncols, char **vals, char **cols) { #define SYSERR(x) do { conf->log->error = 2; return conf->errabort; } while (0) +/* TODO handle other ops properly */ static char *ops[] = { "new", "remove", "update", 0 }; enum op { @@ -1108,7 +1109,7 @@ static void handle_config_files(struct config *conf) { } sqlite3_str_appendall(s, " as dest from syncinfo"); - sqlite3_str_appendall(s," where configuration > 0"); + sqlite3_str_appendall(s," where configuration > 0 and op in ('new','update','remove')"); if (conf->reverse) { sqlite3_str_appendall(s," order by length(path) desc, path desc"); -- 2.40.0