as3corelib icon indicating copy to clipboard operation
as3corelib copied to clipboard

URI.makeAbsoluteURI does not handle local windows filepaths properly

Open darronschall opened this issue 14 years ago • 2 comments

Originally filed by gae.local.test on 2010-07-12T05:40:26

_uri1 = new URI("example.txt"); _url2 = new URI("file://C:/path/to/aDifferentExample.txt"); _uri1.makeAbsoluteURI(_url2 ).toString() returns the string "file://c/path/toexample.txt"

expected output --> string "file://c:/path/to/toexample.txt" (notice the colon in c:/)

I copy and pasted trace output and then shortened for readability. The problem is that the method is removing the colon after the drive identifier.

I am using the current revision at revision 118 according to tortoise svn

darronschall avatar Jul 28 '10 20:07 darronschall

Updated by gae.local.test on 2010-07-12T05:41:54

I made copy and paste errors. The only thing that is wrong with the string it prints out is the missing colon after the drive letter. I can't edit my post to fix it.

darronschall avatar Jul 28 '10 20:07 darronschall

Please note that file://c:/path/to/toexample.txt is actually a broken URI. It should encode to file:///c:/path/to/toexample.txt which equates to file://localhost/c:/path/to/toexample.txt

LexLythius avatar May 27 '11 17:05 LexLythius