mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2025-12-27 23:00:54 +00:00
app: Add comment only when config file has VM group
Avoid the debug message on close: virt-viewer-DEBUG: Unable to get comment from key file: Key file does not have group '39cd210d-5d45-478a-91fe-b3680307f2df'
This commit is contained in:
parent
fcb200e3d4
commit
8c9a968561
@ -259,7 +259,7 @@ virt_viewer_app_save_config(VirtViewerApp *self)
|
||||
g_warning("failed to create config directory");
|
||||
g_free(dir);
|
||||
|
||||
if (priv->uuid && priv->guest_name) {
|
||||
if (priv->uuid && priv->guest_name && g_key_file_has_group(priv->config, priv->uuid)) {
|
||||
// if there's no comment for this uuid settings group, add a comment
|
||||
// with the vm name so user can make sense of it later.
|
||||
gchar *comment = g_key_file_get_comment(priv->config, priv->uuid, NULL, &error);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user