On Tue, Mar 13, 2001 at 01:17:45PM -0800, Guy Harris wrote:
> > Probably because there's something wrong with the pathname construction
> > code, at least on Windows.
> >
> > I didn't have that precise problem; I fired up Ethereal once, added a
> > new display filter, and it saved it OK, but I then fired it up again,
> > deleted the new display filter, and when I tried to save it the dialog
> > box was
> >
> > Could not save to your display filter file "": File exists.
>
> ...which may be the result of a bug in the "save_filter_list()" routine,
> wherein it stores through a pointer argument a pointer to the pathname
> of the filter file it was trying to save, and then frees the pathname
> string, so its caller, when it tries to use that pathname in an error
> message, may get junk from it.
>
> That wouldn't explain the error, but it would explain the bogus file
> name in the dialog box.
The "File exists" problem is a result of Win32 apparently not having a
UNIX-style atomic rename operation, and "rename()", instead, using
"MoveFile()", which fails, rather than removing the target, if the
target exists.
I've checked in a change that should fix this; it'll show up in the next
release.