Wireshark-commits: [Wireshark-commits] rev 42777: /trunk/ /trunk/ui/gtk/: capture_file_dlg.c captur
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=42777
User: guy
Date: 2012/05/22 03:36 AM
Log:
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....)
Update some comments.
Clean up indentation slightly, and get rid of an unnecessary variable
(in all the cases where we use it, we assign it the same value, and that
value isn't modified out from under us before we use it).
Note that after a "Save", or a "Save As" that writes out all captured
packets, we shouldn't have to close the current file and open the new
file and reread it - we should be able to open the new file and update
the frame offsets in the frame_data structures.
Note that we need to do some a better job of reporting rename failures.
Directory: /trunk/ui/gtk/
Changes Path Action
+34 -13 capture_file_dlg.c Modified
+7 -0 capture_file_dlg.h Modified
Directory: /trunk/
Changes Path Action
+123 -25 file.c Modified
+15 -2 file.h Modified