path: root/file.c
diff options
authorGuy Harris <guy@alum.mit.edu>2012-06-20 04:44:14 +0000
committerGuy Harris <guy@alum.mit.edu>2012-06-20 04:44:14 +0000
commit750d666e730d8e21a90e1a65a8b9d7e40f158351 (patch)
treec078ccbcf1cc913438f0dc6a45da0ea9822b8eda /file.c
parent4e5f1e9914eb858961c40b0e354af6cc8b2cc5df (diff)
Handle the case where the user has added comments to a file that's not
in a format that supports comments and they do a "Save" by popping up a similar question to the one we pop up in the "Save As" case and, if they say "choose another format", pop up a "Save As" dialog box. svn path=/trunk/; revision=43395
Diffstat (limited to 'file.c')
1 files changed, 9 insertions, 0 deletions
diff --git a/file.c b/file.c
index 3f341be1fc..7fdbf1747a 100644
--- a/file.c
+++ b/file.c
@@ -3733,6 +3733,15 @@ cf_update_packet_comment(capture_file *cf, frame_data *fdata, gchar *comment)
cf->unsaved_changes = TRUE;
+ * Does this capture file have any comments?
+ */
+cf_has_comments(capture_file *cf)
+ return (cf_read_shb_comment(cf) != NULL || cf->packet_comment_count != 0);
typedef struct {
wtap_dumper *pdh;
const char *fname;