[M3devel] canonicalizepath??
Olaf Wagner
wagner at elegosoft.com
Sun Jun 28 14:27:39 CEST 2009
Quoting Jay <jay.krell at cornell.edu>:
> DoMakeDir 1: /cm3/bin/../pkg/m3cggen/PPC_LINUX
> DoMakeDir 2: /cm3/bin/m3cggen/PPC_LINUX
>
>
> C:\dev2\cm3.2\m3-sys\m3quake\src\QMachine.m3
>
> PROCEDURE DoMakeDir (t: T; n_args: INTEGER) RAISES {Error} =
> VAR val: QValue.T; dir, prefix: TEXT;
> BEGIN
>
> Pop (t, val); dir := QVal.ToText (t, val);
> prefix := Env.Get("CM3_INSTALL_PREFIX");
> IF prefix # NIL THEN
> dir := prefix & dir;
> END;
> RTIO.PutText("DoMakeDir 1: " & dir & "\n");
> dir := Pathname.Compose (CanonicalizePath (Pathname.Decompose (dir)));
> RTIO.PutText("DoMakeDir 2: " & dir & "\n");
> RTIO.Flush();
> MakeDir (t, dir);
> END DoMakeDir;
>
> huh?
Strange :-/
> I don't think I've ever change this..
Nor did I.
> Am I expected to reverse the path before passing it through here?
A quick look at the function seems to show that it only correctly
removes ../.. at the start of a path, if I am not mistaken.
> I'll just avoid this function..
Could you (or anybody else) fix it? I'm in a hurry and won't get to
it till Tuesday night...
I don't think we should leave it that way...
Olaf
--
Olaf Wagner -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
More information about the M3devel
mailing list