Re: [evolution-patches] 41468, default folder type when creating exchange public folder



On Thu, 2003-04-17 at 14:48, Dan Winship wrote: 
> -		if (strcmp (type->type, default_type ? default_type : "mail") == 0)
> +		if (strcmp (type->type, default_type) == 0)
>  			default_item = i;
> +		else if (default_item == 0) {
> +			len = strlen (type->type);
> +			if (strncmp (type->type, default_type, len) == 0 &&
> +			    default_type[len] == '/')
> +				default_item = i;
> +		}

If the default_type can no longer be NULL there should be a
`default_type != NULL' assertion in
e_shell_show_folder_creation_dialog().

Also, shouldn't it initialize default_item to e.g. -1 and check against
-1 instead of zero?  Because zero could also mean that it did find a
match already, in the first position (so e.g. if the first type is
"foo/bar" and the second one is "foo", then a default_type of "foo/bar"
matches against "foo" instead of "foo/bar".)

-- Ettore

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]