From 5de3871898e1ef4aec773e4dc9dc18acf52acee4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 16 Aug 2022 12:08:51 +0200 Subject: [PATCH] cli: drop redundant uci_add_delta_path() call for -P MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit savedir is always present in the list of delta paths. It's guaranteed by 1. uci_alloc_context() which sets defaults 2. uci_set_savedir() which allows changing savedir Calling uci_add_delta_path() with ctx->savedir argument seems to always return UCI_ERR_DUPLICATE. Fixes: 2b4872345ab2b ("make use of the history path feature in the cli") Cc: Felix Fietkau Signed-off-by: Rafał Miłecki --- cli.c | 1 - 1 file changed, 1 deletion(-) diff --git a/cli.c b/cli.c index 2fce39d..b4c4f95 100644 --- a/cli.c +++ b/cli.c @@ -748,7 +748,6 @@ int main(int argc, char **argv) uci_add_delta_path(ctx, optarg); break; case 'P': - uci_add_delta_path(ctx, ctx->savedir); uci_set_savedir(ctx, optarg); flags |= CLI_FLAG_NOCOMMIT; break; -- 2.30.2