45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
From 1733830d33c071d0c35d307426384f01d0f42f1d Mon Sep 17 00:00:00 2001
|
|
From: "Eduardo Lima (Etrunko)" <etrunko@redhat.com>
|
|
Date: Fri, 16 Aug 2019 14:40:23 -0300
|
|
Subject: [PATCH virt-viewer] ovirt-foreign-menu: Only set domain_valid once
|
|
|
|
In the case of having a valid storage domain without any ISO files, this
|
|
variable can be reset to FALSE again in the next iteration of the loop,
|
|
resulting in a misleading error message presented to the user.
|
|
|
|
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
|
|
---
|
|
src/ovirt-foreign-menu.c | 7 +++++--
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/ovirt-foreign-menu.c b/src/ovirt-foreign-menu.c
|
|
index cdf9879..648ce55 100644
|
|
--- a/src/ovirt-foreign-menu.c
|
|
+++ b/src/ovirt-foreign-menu.c
|
|
@@ -666,6 +666,7 @@ static gboolean storage_domain_validate(OvirtForeignMenu *menu G_GNUC_UNUSED,
|
|
}
|
|
#endif
|
|
|
|
+ g_debug ("Storage domain '%s' is %s", name, ret ? "valid" : "not valid");
|
|
g_free(name);
|
|
return ret;
|
|
}
|
|
@@ -694,10 +695,12 @@ static void storage_domains_fetched_cb(GObject *source_object,
|
|
while (g_hash_table_iter_next(&iter, NULL, (gpointer *)&domain)) {
|
|
OvirtCollection *file_collection;
|
|
|
|
- domain_valid = storage_domain_validate(menu, domain);
|
|
- if (!domain_valid)
|
|
+ if (!storage_domain_validate(menu, domain))
|
|
continue;
|
|
|
|
+ if (!domain_valid)
|
|
+ domain_valid = TRUE;
|
|
+
|
|
file_collection = ovirt_storage_domain_get_files(domain);
|
|
if (file_collection != NULL) {
|
|
if (menu->priv->files) {
|
|
--
|
|
2.21.0
|
|
|