From 9d2dfd9d977b21683d93c0facf303f52cee4347a Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Tue, 21 Feb 2017 12:00:27 +0100 Subject: ifcfg: avoid marking newly created connections as Unsaved --- src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c index 3833f3574e..ba8ea323e3 100644 --- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c +++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-connection.c @@ -455,6 +455,11 @@ nm_ifcfg_connection_new (NMConnection *source, if (out_ignore_error) *out_ignore_error = FALSE; + if (full_path) { + /* The connection already is on the disk */ + update_unsaved = FALSE; + } + /* If we're given a connection already, prefer that instead of re-reading */ if (source) tmp = g_object_ref (source); @@ -465,9 +470,6 @@ nm_ifcfg_connection_new (NMConnection *source, out_ignore_error); if (!tmp) return NULL; - - /* If we just read the connection from disk, it's clearly not Unsaved */ - update_unsaved = FALSE; } if (unhandled_spec && g_str_has_prefix (unhandled_spec, "unmanaged:")) -- cgit v1.2.1