-
Notifications
You must be signed in to change notification settings - Fork 475
Closed
Description
Unclear on what the real usage of absoluteTo() is, I assumed it was similar to Python's urlparse.urljoin.
So for example it will base a filename on top of another relative path:
>>> (new URI("aFile")).absoluteTo("aDir/").toString()
"aDir/aFile"
Especially interesting, when the path passed to absoluteTo() is a path to a file resource, too:
>>> (new URI("aFile")).absoluteTo("aDir/anotherFile").toString()
"aDir/aFile"
However, when applied to two file resources, a slash is added which results in an absolute path:
>>> (new URI("aFile")).absoluteTo("anotherFile").toString()
"/aFile"
I would expect just
"aFile"
as there is no valuable path information in the given string.
I don't know if I am misusing the method, or if this really is a bug. In the latter case I will be happy to provide a fix.
Metadata
Metadata
Assignees
Labels
No labels