ifcfg: avoid marking newly created connections as Unsaved

This commit is contained in:
Lubomir Rintel 2017-02-21 12:00:27 +01:00
parent 9cc15d39eb
commit 9d2dfd9d97

View file

@ -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:"))