Fix addition of extensions to file names.
authorGuy Harris <guy@alum.mit.edu>
Sat, 17 Nov 2018 23:24:08 +0000 (15:24 -0800)
committerGuy Harris <guy@alum.mit.edu>
Sun, 18 Nov 2018 00:17:44 +0000 (00:17 +0000)
commitc22c060d2b60255f688c2aa9b6dcc63bdeea0031
tree83d105e1f059d78479fcc821500d460b2007ed27
parent204dc92717a7b6cc2765dc0563a4d353ea0a21d7
Fix addition of extensions to file names.

If the file is to be compressed, then:

  if the type in which the file is to be written has a set of extensions
  it uses, leave the file name alone if it ends with one of those
  extensions followed by the extension for the compression type,
  otherwise append the default extension for that file type followed by
  the extension for the compression type;

  if it doesn't, leave the file name alone if it ends with the extension
  for the compression type, otherwise append the extension for the
  compression type;

otherwise:

  if the type in which the file is to be written has a set of extensions
  it uses, leave the file name alone if it ends with one of those
  extensions, otherwise append the default extension for that file type followed by
  the extension for the compression type;

  if it doesn't, leave the file name alone if it ends with the extension
  for the compression type, otherwise append the extension for the
  compression type.

Change-Id: I7c4093af28cc30d579a2ae9faa8f4164b4764001
Reviewed-on: https://code.wireshark.org/review/30681
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
ui/qt/main_window.cpp