Ethereal-dev: Re: [Ethereal-dev] save silently fails on Win XP

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 23 Jan 2004 16:12:50 -0800

On Jan 23, 2004, at 9:53 AM, Gary Hunt wrote:

When saving a file using Ethereal GUI,

There are several places in Ethereal where you can save stuff; is this for saving the capture file, the text from "Follow TCP Stream", or one of the forms of data from the RTP Analysis facilities?

if the user doesn't have permission to write to the selected folder then the save silently fails. Ideally the user would be warned that they don't have rights and return to the save dialogue.
 
I'm guessing that the code traps the exception

It's not an exception - the calls used to open the files for output return an error code.

 but doesn't handle it correctly.

The return code *is* checked for:

saving the capture file - I tried saving it on UNIX and *did* get an alert box reporting the error, and the code path is the same on Windows, but note that the dialog box might not happen to be on top; however, the file selection dialog box stays up, so you can specify another file;

saving the text from "Follow TCP Stream", in which case I again got an alert box, but the file selection dialog didn't stay up, which is arguably a bug;

"Save Payload to File" for RTP Analysis. where you should get an alert box - I didn't have any RTP captures handy on which to test it;

"Save selected stream in rtpdump format" for RTP Analysis. where it appears it really *will* fail with no indication of the failure.

It does not appear to be checked for the "Save Data as CSV" option for RTP Analysis (but I expect Ethereal would *crash* if that didn't succeed, which is *definitely* a bug).