diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2012-01-23 21:57:45 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2012-01-23 21:57:45 +0000 |
commit | 46fcd568b4efb935bcfc2a9ca5fe7cf0683a3c5b (patch) | |
tree | 6943b1996eb8a66304d394161d57a4947be0057c /wiretap/file_access.c | |
parent | 4619f26cb774b96565aebee321e96ca4953d0524 (diff) |
Have wtap_file_extension_default_string() return the extension in the
sense of "what follows the last . in the file name", i.e. not including
the ".".
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40674 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'wiretap/file_access.c')
-rw-r--r-- | wiretap/file_access.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/wiretap/file_access.c b/wiretap/file_access.c index 3e876aa7aa..92b31b572a 100644 --- a/wiretap/file_access.c +++ b/wiretap/file_access.c @@ -794,13 +794,18 @@ void wtap_free_file_extensions_list(GSList *extensions) g_slist_free(extensions); } -/* Return the default file extension to use with the specified file type. */ +/* Return the default file extension to use with the specified file type; + that's just the extension, without any ".". */ const char *wtap_file_extension_default_string(int filetype) { if (filetype < 0 || filetype >= wtap_num_file_types) return NULL; - else - return dump_open_table[filetype].file_extension_default; + else { + /* + * XXX - skip past the ".". + */ + return dump_open_table[filetype].file_extension_default + 1; + } } gboolean wtap_dump_can_open(int filetype) |