From: <[EMAIL PROTECTED]>
> Hi,
>
> after having some problems with split-path, here is my version:
>
> (Andrew, it may be nice to have it in your %patch.r)
Not yet, Andrew !
>
> split-path: func [
> {
> Splits a file or URL. Returns a block containing path and
> target.
>
Not always. It has other bugs than the original.
It breaks the splitting of URLs (I called your version split-path2) :
>> split-path http://fgdfgdfg.Fgdfg/fgdfgdfg/dfgdfg
== [http://fgdfgdfg.Fgdfg/fgdfgdfg/ %dfgdfg]
>> split-path2 http://fgdfgdfg.Fgdfg/fgdfgdfg/dfgdfg
== [http://fgdfgdfg.Fgdfg/fgdfgdfg/ dfgdfg]
> Overcomes some limitations of the Core split-path like
> strange results for:
>
> split-path %file.r
> split-path %dir/
> split-path to file! ""
The last expression can also be written like that :
split-path %""
>
> Moreover, the identity:
>
> file = (append copy first r: split-path file second r)
>
> is always preserved.
Remember that you can have a look to the source of the original split-path
to improve it :
source split-path
Olivier.