aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-06-25 18:37:52 +0000
committerGuy Harris <guy@alum.mit.edu>2012-06-25 18:37:52 +0000
commitf272aaeb803e7c8e7dd9039cd680e114afbe0319 (patch)
treea120a6fa318d81394118fe232a658a70d045a551 /file.c
parentc96179ed1e6feafbed0f4fbbbc93628aa849692e (diff)
Only allow "Save" if
the file has unsaved changes, and we can save it in some format through Wiretap or the file is a temporary file and has no unsaved changes (so that "saving" it just means copying it). Only allow "Save As" if we can save it in some format through Wiretap or the file is a temporary file and has no unsaved changes (so that "saving" it just means copying it). This means that we don't support using "Save As" for just copying the file unless we can do that with Wiretap; copying the file byte-for-byte only works as "saving" if there are no unsaved changes *and* we're saving it in the same format that it's in *and* we're saving it with the same form of compression (if any) that it has. Rename cf_can_save_as() to cf_can_write_with_wiretap() to better reflect what it really does. svn path=/trunk/; revision=43477
Diffstat (limited to 'file.c')
-rw-r--r--file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/file.c b/file.c
index e5c75f556e..60720aa64d 100644
--- a/file.c
+++ b/file.c
@@ -3833,10 +3833,11 @@ save_packet(capture_file *cf _U_, frame_data *fdata,
}
/*
- * Can this capture file be saved in any format except by copying the raw data?
+ * Can this capture file be written out in any format using Wiretap
+ * rather than by copying the raw data?
*/
gboolean
-cf_can_save_as(capture_file *cf)
+cf_can_write_with_wiretap(capture_file *cf)
{
int ft;