forked from osmocom/wireshark
UI: Rename profiles without delete
Do not try to delete the old profile name after renaming. In most cases it will not exist, but when using a case-insensitive file system this will delete the renamed profile if only changing capitalizations (first it's renamed and then it's deleted). Change-Id: I27d2d22d2353b09f2041d82ea1cf1bae37a1ce3d Reviewed-on: https://code.wireshark.org/review/25515 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
eda5c950b6
commit
043b45e840
|
@ -203,8 +203,6 @@ gchar *apply_profile_changes(void)
|
|||
g_free(pf_dir_path2);
|
||||
}
|
||||
profile1->status = PROF_STAT_EXISTS;
|
||||
g_free (profile1->reference);
|
||||
profile1->reference = g_strdup(profile1->name);
|
||||
}
|
||||
}
|
||||
fl1 = g_list_next(fl1);
|
||||
|
@ -223,7 +221,9 @@ gchar *apply_profile_changes(void)
|
|||
/* Profile exists in both lists */
|
||||
found = TRUE;
|
||||
} else if (strcmp(profile1->name, profile2->reference)==0) {
|
||||
/* Profile has been renamed */
|
||||
/* Profile has been renamed, update reference to the new name */
|
||||
g_free (profile2->reference);
|
||||
profile2->reference = g_strdup(profile2->name);
|
||||
found = TRUE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue