From f272aaeb803e7c8e7dd9039cd680e114afbe0319 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 25 Jun 2012 18:37:52 +0000 Subject: 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 --- file.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'file.h') diff --git a/file.h b/file.h index a86e85fd85..b713c7e3bc 100644 --- a/file.h +++ b/file.h @@ -203,12 +203,12 @@ cf_read_status_t cf_finish_tail(capture_file *cf, int *err); /** * Determine whether this capture file (or a range of it) can be saved - * (except by copying the raw file data). + * in any format using Wiretap rather than by copying the raw data. * * @param cf the capture file to check * @return TRUE if it can be saved, FALSE if it can't */ -gboolean cf_can_save_as(capture_file *cf); +gboolean cf_can_write_with_wiretap(capture_file *cf); /** * Save all packets in a capture file to a new file, and, if that succeeds, -- cgit v1.2.3