Lieven Govaerts wrote:
>
>
>
>> -----Original Message-----
>> From: Branko Čibej [mailto:brane@xbc.nu]
>> Sent: zondag 20 augustus 2006 18:38
>>
> ..
>
>
>> * Don't make calling apr_filepath_root Windows-specific; that
>> defeats the whole point of calling that function in the
>> first place.
>>
>
> It was meant as a 'don't punish the guys that are not responsible for the
> problem' thing, but I've removed it now.
>
All the world isn't Unix and Windows. :)
I imagine there are still a few systems out there that use a third
scheme. APR works on OS/2 and Netware, for example; I don't know if
anyone's ported Subversion to those platforms, but if they do, it'll
certainly help to use apr_filepath_root there.
>> * Use svn_path_cstring_from_utf8, which will convert the string from
>>
> internal encoding to whatever APR expects (and is usually a no-op
>
>> on Windows, by the way).
>>
>
> I have a problem here, which I hope you can help me with.
>
> The function svn_path_cstring_from_utf8 returns svn_error_t *, but I don't
> know how to handle that potential error. I've tried to change the return
> type of svn_path_is_root, but that would push the problem to its callers.
> Atleast two of those callers svn_path_basename and svn_path_join are public
> functions, so I can't change those declarations.
>
> I could convert the string somewhere higher in the stack, but that doesn't
> seem right either.
>
> Suggestions?
>
I think you can safely convert an error to a false return value. An
error in this case would indicate that the path isn't encoded in UTF-8,
which will cause problems elsewhere, anyway.
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Aug 20 23:22:15 2006