ui: Write recent file when applying profile changes

Write the recent file for the current profile before copying or renaming
the profile to ensure the latest changes are not lost.

Change-Id: Ib07881925b398314da0a9b2ec875da7650b84712
Reviewed-on: https://code.wireshark.org/review/19984
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
Stig Bjørlykke 2017-02-07 15:30:43 +01:00
parent cecf9f13fe
commit 1185fbab42
1 changed files with 6 additions and 1 deletions

View File

@ -33,6 +33,7 @@
#include "profile.h"
#include "ui/simple_dialog.h"
#include "ui/recent.h"
#include <wsutil/file_util.h>
@ -109,7 +110,8 @@ get_profile_parent (const gchar *profilename)
return profilename;
}
const gchar *apply_profile_changes(void) {
const gchar *apply_profile_changes(void)
{
char *pf_dir_path, *pf_dir_path2, *pf_filename;
GList *fl1, *fl2;
profile_def *profile1, *profile2;
@ -127,6 +129,9 @@ const gchar *apply_profile_changes(void) {
fl1 = g_list_next(fl1);
}
/* Write recent file for current profile before copying or renaming */
write_profile_recent();
/* Then do all copy profiles */
fl1 = edited_profile_list();
while (fl1) {