diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-11-17 16:29:37 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-11-18 00:59:32 +0000 |
commit | 7370a6f00f602941e492173164e6d697fd309640 (patch) | |
tree | 68a551e41b23a9d74b3ac9b572853ed3119d5b0d /ui/qt/main_window.cpp | |
parent | c22c060d2b60255f688c2aa9b6dcc63bdeea0031 (diff) |
Clean up previous change.
compressed_file_extension shouldn't include the ".", as we insert the
"." before it.
Use it when appending the extension, rather than hardwiring "gz" in two
places.
Change-Id: I89e3ed1df9a8457fdbb6e6386686176816f4671b
Reviewed-on: https://code.wireshark.org/review/30682
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt/main_window.cpp')
-rw-r--r-- | ui/qt/main_window.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index e958c37fb7..aba97e09a1 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -1665,7 +1665,7 @@ void MainWindow::fileAddExtension(QString &file_name, int file_type, wtap_compre /* Get the extension for the compression type we'll be using, or NULL if we won't be compressing it. */ compressed_file_extension = - (compression_type == WTAP_UNCOMPRESSED) ? NULL : ".gz"; + (compression_type == WTAP_UNCOMPRESSED) ? NULL : "gz"; if (extensions_list != NULL) { GSList *extension; @@ -1727,7 +1727,7 @@ void MainWindow::fileAddExtension(QString &file_name, int file_type, wtap_compre * The file is to be compressed, so append the extension for * its compression type. */ - file_name += QString(".gz"); + file_name += QString(".") + compressed_file_extension; } } } |