[MonoDevelop] Win32 patch
Lluis Sanchez
lluis at ximian.com
Fri Sep 1 11:01:47 EDT 2006
El dv 01 de 09 del 2006 a les 09:28 -0500, en/na Levi Bard va escriure:
...
>
> > I didn't review the whole thing but here are some:
> > + char splitc = SystemPackage.IsWin32 ? ';' : ':' ;
> >
> > I think just use System.IO.Path.DirectorySeperatorChar for this
>
> This isn't the DirectorySeparatorChar, this is the char to separate
> different elements in environment variables. E.g. Unix PATH:
> /bin:/usr/bin Win32 PATH: c:\windows;c:\windows\system
That's System.IO.Path.PathSeparator (not DirectorySeparatorChar).
>
> > For all the path stuff like:
> > file = file.Substring (7);
> > if (file.StartsWith("/") && SystemPackage.IsWin32)
> > file =file.Substring(1);
>
> This is necessary for URIs because on Unix, new
> Uri("/blah").ToString() => "file:///blah" , and on win32, new
> Uri("c:\blah").ToString() => "file:///c:/blah" (also with .net).
You can use Uri.AbsolutePath for this.
Lluis.
More information about the Monodevelop-list
mailing list