Ethereal-dev: Re: [ethereal-dev] [PATCH] Saving a temporary file on WIN32

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Tue, 28 Mar 2000 00:03:28 -0800
> Won't your patch leave the original trace file on disk? Since it's doing
> a copy and not a rename, the original temporary file is never deleted.

Perhaps, perhaps not.

Note that, after we save a complete capture file (rather than saving
only the packets that match the current display filter), we open and
read the file we saved to - which means closing the old capture file.

"close_cap_file()" should, I think, remove the file if it's a temporary
file - which is why it gets cleaned up if we do a copy rather than a
rename on UNIX (e.g., if the source file and directory for the
destination file aren't on the same file system).

I'll check your version of the patch in, and try it on my NT partition.