mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 06:38:11 +02:00
ifcfg: avoid marking newly created connections as Unsaved
This commit is contained in:
parent
9cc15d39eb
commit
9d2dfd9d97
1 changed files with 5 additions and 3 deletions
|
|
@ -455,6 +455,11 @@ nm_ifcfg_connection_new (NMConnection *source,
|
||||||
if (out_ignore_error)
|
if (out_ignore_error)
|
||||||
*out_ignore_error = FALSE;
|
*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 we're given a connection already, prefer that instead of re-reading */
|
||||||
if (source)
|
if (source)
|
||||||
tmp = g_object_ref (source);
|
tmp = g_object_ref (source);
|
||||||
|
|
@ -465,9 +470,6 @@ nm_ifcfg_connection_new (NMConnection *source,
|
||||||
out_ignore_error);
|
out_ignore_error);
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
return NULL;
|
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:"))
|
if (unhandled_spec && g_str_has_prefix (unhandled_spec, "unmanaged:"))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue