keyfile: also add ".nmconnection" extension when writing keyfiles in /etc

This is a change in behavior regarding the filename that we choose when
writing files to "/etc/NetworkManager/system-connections/".
This commit is contained in:
Thomas Haller
2018-10-19 15:12:34 +02:00
parent 4ca7fa7f4a
commit d37ad15f12

View File

@@ -352,19 +352,16 @@ nms_keyfile_writer_connection (NMConnection *connection,
GError **error)
{
const char *keyfile_dir;
gboolean with_extension = FALSE;
if (save_to_disk)
keyfile_dir = nms_keyfile_utils_get_path ();
else {
else
keyfile_dir = NM_CONFIG_KEYFILE_PATH_IN_MEMORY;
with_extension = TRUE;
}
return _internal_write_connection (connection,
keyfile_dir,
nms_keyfile_utils_get_path (),
with_extension,
TRUE,
0,
0,
existing_path,