summaryrefslogtreecommitdiff
path: root/ui/profile.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2017-02-07 15:30:43 +0100
committerStig Bjørlykke <stig@bjorlykke.org>2017-02-07 20:42:15 +0000
commit1185fbab426830a04a5fa2042c656666efc3a3f3 (patch)
tree20165960bd8dab26ed069246ccb1214180e1497f /ui/profile.c
parentcecf9f13fe4aa283bba131e53ae2c84a4a68ccfb (diff)
downloadwireshark-1185fbab426830a04a5fa2042c656666efc3a3f3.tar.gz
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>
Diffstat (limited to 'ui/profile.c')
-rw-r--r--ui/profile.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/profile.c b/ui/profile.c
index 2493dd323b..dba694e3e5 100644
--- a/ui/profile.c
+++ b/ui/profile.c
@@ -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) {