This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [PATCH] Fix another setup.exe crash.
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-apps at cygwin dot com
- Date: Mon, 30 Nov 2009 10:59:47 +0100
- Subject: Re: [PATCH] Fix another setup.exe crash.
- References: <4B102C5B.6090608@gmail.com>
- Reply-to: cygwin-apps at cygwin dot com
On Nov 27 19:45, Dave Korn wrote:
> The attached patch resolves this by noticing if the std::map::find() method
> call returns the not-found result, and supplying a static dummy empty "All"
> Category object to the PickView constructor instead. This results in a
> chooser page with a single category heading, "None found", and nothing in the
> category. That's nicer than a crash.
>
> It might be better to detect the coincidence of conditions 1) and 2) above
> and just tell the user they've done something wrong, but it would be more
> complex because the information isn't conveniently available in one place at
> one time, so I figured this was a reasonable fix instead, but maybe we should
> bikeshed the best wording for the empty category header a bit - perhaps it
> should say something like "No packages found in chosen package directory"?
"No packages found" should be sufficient, shouldn't it?
> setup/ChangeLog:
>
> * choose.cc (empty_cat): New variable.
> (dummy_cat): Likewise.
> (ChooserPage::createListview): Use them to construct PickView when
> nothing is found in the "All" category.
>
> OK?
Sure, go ahead.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat