mirror: On unset, always reload default values

If you run:

$ swupd mirror --unset -u sample

We should print the default URL and not 'sample'

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This commit is contained in:
Otavio Pontes
2019-07-25 14:06:27 -07:00
parent 2cab05ea21
commit 613e3aa4aa
+1 -1
View File
@@ -114,6 +114,7 @@ static int unset_mirror_url()
goto out;
}
out:
/* we need to also unset the mirror urls from the cache and set it to
* the central version */
free_string(&globals.version_url);
@@ -121,7 +122,6 @@ static int unset_mirror_url()
set_default_version_url();
set_default_content_url();
get_latest_version("");
out:
free_string(&content_path);
free_string(&version_path);
return ret;