Skip to content

Commit 80719c1

Browse files
author
Otavio Pontes
committed
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 <[email protected]>
1 parent 518f9ae commit 80719c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/mirror.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,9 @@ enum swupd_code mirror_main(int argc, char **argv)
364364
print_help();
365365
return SWUPD_INVALID_OPTION;
366366
}
367+
if (!globals.path_prefix) {
368+
set_default_path_prefix();
369+
}
367370

368371
progress_init_steps("mirror", steps_in_mirror);
369372

0 commit comments

Comments
 (0)