[Q] Isn't 'file://foo/bar' asUrl supposed to give a relative FileUrl?

Markus Gaelli gaelli at emergent.de
Wed Aug 6 12:55:36 UTC 2003


The situation right now is as follows:

'file:foo/bar' asUrl isAbsolute -> false
'file:/foo/bar' asUrl isAbsolute -> true
'file://foo/bar' asUrl isAbsolute -> true
'file:///foo/bar' asUrl isAbsolute -> true

According to http://www.w3.org/Addressing/rfc1738.txt and
http://www.cs.tut.fi/~jkorpela/fileurl.html
there always should be two leading /, after the name of the
protocol. So we allow the first two lines above only for convenience.

But how could one create a local url (in the case of Squeak
local to the current squeak dir, I guess) legally?

Right now you can't.

So I would suggest, that 'file://foo/bar' asUrl pathForFile
should give us a _local_ file, and that
  'file://foo/bar' asUrl isAbsolute" should yield false.

There is a twist in that story, that right now every FileUrl is
converted to a local file, which is a bug.
I send an example/test/fix trio for that.

Is that right? Comments?

Markus



More information about the Squeak-dev mailing list