Skip to content
Tcl Source Code Artifact [d96de9c2d2]
Login

Artifact [d96de9c2d2]

Artifact d96de9c2d28cef76aadf4d0e83b3d6157014b30a88324820ec289abc6ad1a8f6:

Ticket change [d96de9c2d2] - Ticket [9e6b569963ea497e|9e6b569963] <i>file normalize ~user fails on Windows</i> status still Open with 3 other changes by apnadkarni on 2018-05-25 12:50:26.
D 2018-05-25T12:50:26.741
J icomment For\smy\sown\sunderstanding,\sI\swould\slike\sto\ssummarize\sthe\ssituation\r\n*specifically\swith\srespect\sto\sthe\sfunction\sTclpGetUserHome*.\sThe\r\n"name"\sparameter\spassed\sto\sthis\sfunction\smay\sbe\sone\sof\sthe\sforms\r\n\r\n1.\splain\sname\swith\sno\sdomain\s(joe).\sFurther,\r\n1a.\sjoe\smay\sbe\sa\slocal\scomputer\ssystem\saccount,\sor\r\n1b.\sjoe\smay\sbe\san\saccount\sin\sthe\sdefault\sdomain\r\n2.\sname\sin\sSAM\sformat\s(ACME\\joe)\s\r\n3.\sname\sin\sdns\sformat\s([email protected])\s\r\n\r\nMy\sunderstanding\sis\sthat\s8.6\s(and\sI\sassume\s8.5)\sonly\shandled\s1a\r\ncorrectly\sand\swas\sbroken\sfor\s1b,\s2\sand\s3.\r\n\r\nIf\sI\sread\sthe\ssource\scorrectly,\sFrancois's\s[adbe7e0e07]\schanges\stake\r\ncare\sof\s2\sand\s3\sas\swell\sbut\snot\s1b.\s[sebres-bug-9e6b569963-8-5-branch]\r\ntakes\scare\sof\s1a\sand\s3\sbut\snot\s2.\r\n\r\nNow\swhen\scan\sCase\s2\shappen?\sAs\sdiscussed,\sthe\s~domain\\user\scase\scannot\r\nbe\sdistinguished\sfrom\s~user\\path\sso\swe\shave\sto\sforget\sabout\sworrying\r\nabout\sthat\scase.\sSo\sthe\sonly\spossible\spath\sto\sthat\scase\sseems\sto\sbe\sif\r\n"~"\sby\sitself\sgot\smapped\sto\sa\suser\saccount\sname\sof\sthe\sform\r\ndomain\\user.\sNow\sit\sturns\sout\stracing\sback\sto\sthe\scode\sthat\sthis\snever\r\nhappens.\sA\s~\sby\sitself\salways\sresolves\sto\senv(HOME).\senv(HOME)\sin\sturn\r\nis\spicked\sup\sfrom\sthe\senvironment\sand\sif\sit\sit\sdoes\snot\sexist,\sit\sis\r\nconstructed\sfrom\senv(HOMEDRIVE)\sand\senv(HOMEPATH).\sIf\sthose\sdo\snot\r\nexist\seither,\sit\sis\sset\sto\sthe\sroot\sof\sthe\ssystem\sdrive.\r\n\r\nThus\sI\sbelieve\sTclpGetUserHome\swill\snever\ssee\sCase\s2.\r\n\r\nHOWEVER...\r\n\r\nThe\scurrent\sbehaviour\sof\sconstructing\sa\s"fake"\sHOME\senvironment\r\nvariable\sif\sit\sdoes\snot\sexist\sseems\sjust\splain\swrong\sto\sme.\sWhat\sTcl\r\n*should*\sbe\sdoing\sif\sHOME\sis\snot\sdefined\sis\scall\sTclpGetUserHome\swith\r\nthe\scurrent\suser\sname\sretrieved\svia\sGetUserNameEx.\sI\sthink\sthis\schange\r\nshould\sbe\smade\sfor\ssome\sfuture\srelease,\s8.7\sor\s9.\r\n\r\nThis\sfor\sfuture\sproofing,\sI\swould\ssuggest\spicking\sup\sthe\ssebres*\r\nbranch\swith\sthe\saddition\sof\sthe\scheck\sfor\sdomain\\user\sfrom\sFrancois.\r\n\r\nOn\sa\sstylistic\sissue\s(not\sbug),\sit\swould\sbe\sclearer\sto\sme\sat\sleast\sif\r\nthe\ssingle\swhile\sloop\swas\sbroken\sout\sexplicitly\srather\sthan\ssetting\r\ndomain\s=\s-1.
J login apnadkarni
J mimetype text/plain
K 9e6b569963ea497e9e623a79d5a5f92c5681bfdb
U apnadkarni
Z fc43b9bcebc99730484f9663d34e0bb9