Overview
| Artifact ID: | 1faf716b401cb3d5b3e0f29afc709338daca4d80b43d20548691a879130234c3 |
|---|---|
| Ticket: | 9e6b569963ea497e9e623a79d5a5f92c5681bfdb
file normalize ~user fails on Windows |
| User & Date: | sebres on 2018-05-28 14:06:08 |
Changes
- icomment:
I've merged my branch to 8.5/8.6. @Francois and @Ashok, thanks for testing and review. Additionally as suggested by Ashok the changes reintegrated back to bug-9e6b569963 (see [c471b6d83a]) to cover the case ~domain\user (TclpGetUserHome only), if someone needs it. Note I still think it could be too dangerous.<br/> So in this branch "bug-9e6b569963": the call "file normalize ~domain\user" splits the path before it calls TclpGetUserHome, so the syntax ~domain\user is impossible anyway. <b>But "glob ~domain\user" does the tilde-substitution a bit differently</b>, so it is affected by this branch (and IMHO confusion of "~domain\user" with "~user\path" takes place at the moment in this branch). <code><pre> % file normalize ~$::tcl_platform(user)@$::env(USERDOMAIN) //hspfil08.my-domain/home/sergey.brester % file normalize ~$::env(USERDOMAIN)\\$::tcl_platform(user) user "my-domain" doesn't exist % glob ~$::tcl_platform(user)@$::env(USERDOMAIN) {//hspfil08.my-domain/home/sergey.brester} % glob ~$::env(USERDOMAIN)\\$::tcl_platform(user) {//hspfil08.my-domain/home/sergey.brester} % glob ~$::tcl_platform(user) {//hspfil08.my-domain/home/sergey.brester} </pre></code> So the difference to current 8.6: </code><pre> % # bug-9e6b569963 % glob ~$::env(USERDOMAIN)\\$::tcl_platform(user) {//hspfil08.my-domain/home/sergey.brester} % # core-8-6-branch % glob ~$::env(USERDOMAIN)\\$::tcl_platform(user) user "my-domain\sergey.brester" doesn't exist % # both % file normalize ~$::env(USERDOMAIN)\\$::tcl_platform(user) user "my-domain" doesn't exist </pre></code> Therefore, I don't recommend to use branch bug-9e6b569963 as is (possibly "DoTildeSubst" should be "fixed" in this or in any case). Anyway the subject is closed in 8.5/8.6 so the ticket can be closed theoretically. But I'll set it to pending state (because of still existing branch bug-9e6b569963 and lack of clarity with "~domain\user" syntax and the tilde-substitution). - login: "sebres"
- mimetype: "text/x-fossil-wiki"
- status changed to: "Pending"