initrd: actually use the constructed filename

Otherwise the file gets dumped into CWD instead of the intended location
in the connection dir.

Fixes: 61717cc575
This commit is contained in:
Lubomir Rintel 2018-11-27 11:10:00 +01:00
parent 25a0739658
commit d6c2f23b9e

View file

@ -63,7 +63,7 @@ output_conn (gpointer key, gpointer value, gpointer user_data)
filename = nm_keyfile_utils_create_filename (basename, TRUE);
full_filename = g_build_filename (connections_dir, filename, NULL);
if (!nm_utils_file_set_contents (filename, data, len, 0600, &error))
if (!nm_utils_file_set_contents (full_filename, data, len, 0600, &error))
goto err_out;
} else
g_print ("\n*** Connection '%s' ***\n\n%s\n", basename, data);