Hi Doru, On 28 Mar 2013, at 15:08, Tudor Girba <[email protected]> wrote:
> 'file:d:/' asUrl ==> file:///d%3A/ > 'file://d:/' asUrl ==> file://d:/ > > The second looks nice, but: > 'file://d:/' asUrl asFileReference ==> File @ > > The problem seems to be that: > 'file://d:/' asUrl pathString ==> '' > > :( You could try a bit with the extension methods in the package Zinc-Resource-Meta-FileSystem in Pharo 2.0 'file:///c:/' asZnUrl asFileReference ==> File @ /c: But Windows File URLs are a big mess ;-) So, any help is greatly appreciated, but do also check specifications. Sven > Cheers, > Doru > > On Thu, Mar 28, 2013 at 2:50 PM, Camillo Bruni <[email protected]> wrote: > > On 2013-03-28, at 14:44, Tudor Girba <[email protected]> wrote: > > > Hi, > > > > I am trying to get to a FileUrl via the polymorphic asUrl call, but it > > seems I am doing something wrong. > > > > I do: > > 'file:d:\' asUrl > > > > but the problem seems that $: and $\ are mangled, because when I print, I > > get: > > file:///d%3A%5C > > > > Furthermore: > > 'file:d:\' asUrl asFileReference exists ==> false > > > > but, at the same time: > > 'd:\' asFileReference exists ==> true > > > > Can anyone tell me where is the mistake? > > > > Btw, the reason I am looking for this is that I would like to use the > > ZeroConf support to load a configuration from a directory Monticello > > repository and to do that I have to pass a url to the command line. > > > I guess that will work out of the box under linux. > I think the URL parsing with the directory letter under windows is broken. > And I bet there is no test catching that either. > > Did you try the following? > 'file://d:/' asUrl > 'file:d:/' asUrl > > > > > -- > www.tudorgirba.com > > "Every thing has its own flow" -- Sven Van Caekenberghe http://stfx.eu Smalltalk is the Red Pill
