mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 05:00:15 +01:00
keyfile: use nm_utils_file_is_in_path() for detecting required rename
This commit is contained in:
parent
6c07faa013
commit
f324091557
1 changed files with 4 additions and 3 deletions
|
|
@ -189,13 +189,14 @@ _internal_write_connection (NMConnection *connection,
|
|||
WriteInfo info = { 0 };
|
||||
GError *local_err = NULL;
|
||||
int errsv;
|
||||
gboolean rename = force_rename;
|
||||
gboolean rename;
|
||||
|
||||
g_return_val_if_fail (!out_path || !*out_path, FALSE);
|
||||
g_return_val_if_fail (keyfile_dir && keyfile_dir[0] == '/', FALSE);
|
||||
|
||||
if (existing_path && !g_str_has_prefix (existing_path, keyfile_dir))
|
||||
rename = TRUE;
|
||||
rename = force_rename
|
||||
|| ( existing_path
|
||||
&& !nm_utils_file_is_in_path (existing_path, keyfile_dir));
|
||||
|
||||
switch (_nm_connection_verify (connection, error)) {
|
||||
case NM_SETTING_VERIFY_NORMALIZABLE:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue