diff options
author | Hadriel Kaplan <hadrielk@yahoo.com> | 2014-03-20 12:57:29 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-03-21 17:51:45 +0000 |
commit | d1873dbcc89eb3138027d8e5c5e4c5b12420e797 (patch) | |
tree | 3798641bfbe067ef123d9ba125371b7090e7c7fd /ui/gtk | |
parent | 49be990fd3ec0faac89b0a0bcda9a3e4562820ab (diff) |
Fix Bug 9903: 'Clicking reload-file ignores selected file format reader'
There's a relatively new feature in 1.11.3 to select a specific file format
reader, instead of relying on magics or heuristics. If you select a file
reader and open a file, open it, and then click the reload-file button or go
to View->Reload or press the ctrl-R keymap, the file is reloaded but using the
magic/heuristics again instead of the file format reader you previously chose.
Likewise, the Lua relaod() function has the same issue (which is how I found
this problem).
I have tested this change by hand, using a Lua script, but I didn't add it
to the testsuite because I need another change for my test script to work
correctly. (an enhancement rather than a bug fix, which I'll submit separately)
Change-Id: I48c2d9ea443e37fd9d41be43d6b6cd5a866d5b01
Reviewed-on: https://code.wireshark.org/review/764
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/gtk')
-rw-r--r-- | ui/gtk/capture_file_dlg.c | 4 | ||||
-rw-r--r-- | ui/gtk/funnel_stat.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ui/gtk/capture_file_dlg.c b/ui/gtk/capture_file_dlg.c index e350342c0a..baef2baed9 100644 --- a/ui/gtk/capture_file_dlg.c +++ b/ui/gtk/capture_file_dlg.c @@ -709,7 +709,7 @@ file_open_cmd(capture_file *cf, GtkWidget *w _U_) continue; } - /* Try to open the capture file. */ + /* Try to open the capture file. This closes the current file if it succeeds. */ if (cf_open(&cfile, file_name->str, type, FALSE, &err) != CF_OK) { /* We couldn't open it; don't dismiss the open dialog box, just leave it around so that the user can, after they @@ -990,7 +990,7 @@ file_merge_cmd(GtkWidget *w _U_) cf_close(&cfile); - /* Try to open the merged capture file. */ + /* Try to open the merged capture file. This closes the current file if it succeeds. */ if (cf_open(&cfile, tmpname, WTAP_TYPE_AUTO, TRUE /* temporary file */, &err) != CF_OK) { /* We couldn't open it; fail. */ if (rfcode != NULL) diff --git a/ui/gtk/funnel_stat.c b/ui/gtk/funnel_stat.c index 1b3dc00662..5d03fefbde 100644 --- a/ui/gtk/funnel_stat.c +++ b/ui/gtk/funnel_stat.c @@ -515,7 +515,7 @@ static gboolean funnel_open_file(const char* fname, const char* filter, const ch } } - + /* This closes the current file if it succeeds. */ if (cf_open(&cfile, fname, WTAP_TYPE_AUTO, FALSE, &err) != CF_OK) { *err_str = g_strerror(err); if (rfcode != NULL) dfilter_free(rfcode); |