Wireshark-bugs: [Wireshark-bugs] [Bug 7327] Save (as) pcapng creates new file with extra .pcapng
Date: Tue, 5 Jun 2012 00:02:36 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7327

Guy Harris <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Guy Harris <[email protected]> 2012-06-05 00:02:35 PDT ---
The "extra .pcapng" problem is probably fixed by rev 42800:

  r42800 | guy | 2012-05-22 20:05:17 -0700 (Tue, 22 May 2012) | 12 lines

  In Windows, in the Save As and Export Selected Packets dialog, append
  the default extension for the file type iff

          the file type we're using has a list of extensions;

          the file has no extension or it has one but it's not one of the
          ones in the list.

  *Don't* expect a file extension to be at most 5 characters plus the dot
  - the extension for pcap-ng, our default capture file type, is "pcapng",
  and that's 6 characters!

As for Save, it shouldn't even pop up a dialog box, it should just replace the
file.  That was done in the UN*X code path by rev 42777:

  r42777 | guy | 2012-05-22 03:36:40 -0700 (Tue, 22 May 2012) | 24 lines

  We're an editor now, as we let you add, delete, and edit frame comments,
  so "Save" should, for non-temporary files, mean "save the current state
  of the capture file on top of the existing file" without prompting for a
  file name.

  That means we have to do a "safe save" - i.e, write the capture out to a
  new file and, if that succeeds, rename the new file on top of the old   
  file - as the actual packet data to write out is in the file we're
  overwriting, not in memory.  (We'd want to do that anyway, of
  course....)

    ...

and somewhere along the line that happened for Windows as well.

Try this with a nightly build for Windows, and see if that fixes those
problems.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.