<[EMAIL PROTECTED]> wrote:
> Hi,
>
> it isn't that bad. Have a look, please:
>
> >> split-path2 http://fgdfgdfg.Fgdfg/fgdfgdfg/dfgdfg
> == [http://fgdfgdfg.Fgdfg/fgdfgdfg/ dfgdfg]
> >> type? second split-path2 http://fgdfgdfg.Fgdfg/fgdfgdfg/dfgdfg
> == url!
So it is bad!
It should give file!
Hi,
you wrote:
> > There is also others problems with the original split-path:
> > >> split-path http://www.rebol.com
> > == [http:// %www.rebol.com]
> > >> split-path http://www.rebol.com/
> > == [http:// %www.rebol.com/]
> >
> > I would prefer to get
> > == [http://www.rebol.com/ none]
> > in b
[EMAIL PROTECTED] wrote:
> clean-path is as buggy (even more) :
> >> clean-path http://www/dfhfgh/../fghfgh
> == http://www/dfhfgh/../fghfgh
> (doesn't remove . and .. in URLs)
This is intended behaviour, as stated on this ml some time ago.
".."s may be relevant in URLs (in particular for FTP).
AIL PROTECTED]>
Komu: <[EMAIL PROTECTED]>
Odesláno: 27. února 2000 19:26
Predmet: [REBOL] Split-path correction Re:
>
> From: <[EMAIL PROTECTED]>
> > Hi,
> >
> > after having some problems with split-path, here is my
version:
> >
> > (
Hi, Andrew,
>> split-path %file.r
== [%./ "file.r"]
I don't think, that this is correct, because the second element of
the result has got a wrong type and, moreover, the first element
is incorrect, because the identity:
file = (append copy first r: split-path file second r)
is not preserved, w
Olivier wrote:
> There is a problem. Look at the type of the second element of the result :
> >> split-path %fdgd/file.r
> == [%fdgd/ %file.r]
> >> split-path %file.r
> == [%./ "file.r"]
>
> In one case it is a string!, in the other it is a file!.
I haven't come across that one! I agree totally t
Andrew Martin wrote:
> [EMAIL PROTECTED] wrote:
> > split-path %file.r
> > split-path %dir/
>
> These ones, I feel, aren't a problem. The existing implementation of
> split-path is correct, I believe.
There is a problem. Look at the type of the second element of the resul
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 alwa
[EMAIL PROTECTED] wrote:
> after having some problems with split-path, here is my version:
>
> (Andrew, it may be nice to have it in your %patch.r)
> split-path %file.r
> split-path %dir/
These ones, I feel, aren't a problem. The existing implementation of
split-path is c