diff options
Diffstat (limited to 'src/settings/plugins/keyfile/nms-keyfile-connection.c')
| -rw-r--r-- | src/settings/plugins/keyfile/nms-keyfile-connection.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/settings/plugins/keyfile/nms-keyfile-connection.c b/src/settings/plugins/keyfile/nms-keyfile-connection.c index 300aa9f7..5a6d8a76 100644 --- a/src/settings/plugins/keyfile/nms-keyfile-connection.c +++ b/src/settings/plugins/keyfile/nms-keyfile-connection.c @@ -65,7 +65,7 @@ commit_changes (NMSettingsConnection *connection, nm_assert (out_reread_connection && !*out_reread_connection); nm_assert (!out_logmsg_change || !*out_logmsg_change); - if (!nms_keyfile_writer_connection (new_connection ?: NM_CONNECTION (connection), + if (!nms_keyfile_writer_connection (new_connection, nm_settings_connection_get_filename (connection), NM_FLAGS_ALL (commit_reason, NM_SETTINGS_CONNECTION_COMMIT_REASON_USER_ACTION | NM_SETTINGS_CONNECTION_COMMIT_REASON_ID_CHANGED), @@ -159,11 +159,14 @@ nms_keyfile_connection_new (NMConnection *source, NULL); /* Update our settings with what was read from the file */ - if (!nm_settings_connection_replace_settings (NM_SETTINGS_CONNECTION (object), - tmp, - update_unsaved, - NULL, - error)) { + if (!nm_settings_connection_update (NM_SETTINGS_CONNECTION (object), + tmp, + update_unsaved + ? NM_SETTINGS_CONNECTION_PERSIST_MODE_UNSAVED + : NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP, + NM_SETTINGS_CONNECTION_COMMIT_REASON_NONE, + NULL, + error)) { g_object_unref (object); object = NULL; } |