From e309850ea115faae1948d7c2fc7ac86f4781fd47 Mon Sep 17 00:00:00 2001 From: Otavio Pontes Date: Thu, 9 Apr 2020 09:08:54 -0700 Subject: [PATCH] mirror: mirror --set/--unset fails when --path is not used Before swupd_init if --path is not used, path_prefix is NULL. Calling set_default_path_prefix() to force it back to correct value. Signed-off-by: Otavio Pontes --- src/mirror.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mirror.c b/src/mirror.c index b0d67c55..1e18dce8 100644 --- a/src/mirror.c +++ b/src/mirror.c @@ -364,6 +364,9 @@ enum swupd_code mirror_main(int argc, char **argv) print_help(); return SWUPD_INVALID_OPTION; } + if (!globals.path_prefix) { + set_default_path_prefix(); + } progress_init_steps("mirror", steps_in_mirror);