Artifacts Associated With Ticket e83a97c7fee9d6bc
Ticket change [6679ffa549] (rid 176811) by sebres on 2019-11-08 13:23:56:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
Issue could be considered as continuation of [9e6b569963]... Under windows it is possible to have relative paths (file and directory names) starting with tilde, as such it is "partially absolute" path, so in my opinion should be interpreted as relative if used in file join.<br/> From this point of view <code>file join $dirname $filename</code> behaves incorrectly under windows if <code>filename</code> starting with <code>~</code> characters: <code><pre style="padding-left:10pt"> % file join $env(tmp) ~* ~* % file join $env(tmp) ~abc.txt ~abc.txt </pre></code> Where <code>glob</code> already has correct behavior here: <code><pre style="padding-left:10pt"> % glob -directory e:/temp ~* e:/temp/~abc.txt % glob e:/temp/~* e:/temp/~abc.txt % cd e:/temp % glob [pwd]/~* E:/Temp/~abc.txt </pre></code> Just this one is a bit confusing (I know it is a bit "ambiguous", but...): <code><pre style="padding-left:10pt"> % glob ~* user "*" doesn't exist </pre></code> Despite ambiguity it looks still weird to me: <ol> <li> either the decision remains "path of pattern is absolute", it could be fixed to list all users/homes where caller is permitted.</li> <li> or the decision going either to "path of pattern considered as relative" under windows, it should behave like <code>glob [pwd]/~*</code> (so find all files starting with "~" in current directory).</li> </ol> Anyway (after fix) it could be additionally documented (with difference between unix/windows).
- foundin initialized to: "any"
- is_private initialized to: "0"
- login: "sebres"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "sebres"
- subsystem initialized to: "36. Pathname Management"
- title initialized to:
windows: paths starting with tilde (~) are "partially" absolute
- type initialized to: "Bug"
Ticket change [3d3271ca51] (rid 176812) by sebres on 2019-11-08 13:30:37:
- comment changed to:
Issue could be considered as continuation of [9e6b569963]... Note the ticket is only about <code>~*</code> and not <code>~/*</code> (which could be firstly considered as rather absolute path). Under windows it is possible to have relative paths (file and directory names) starting with tilde, as such it is "partially absolute" path, so in my opinion should be interpreted as relative if used in file join.<br/> From this point of view <code>file join $dirname $filename</code> behaves incorrectly under windows if <code>filename</code> starting with <code>~</code> characters: <code><pre style="padding-left:10pt"> % file join $env(tmp) ~* ~* % file join $env(tmp) ~abc.txt ~abc.txt </pre></code> Where <code>glob</code> already has correct behavior here: <code><pre style="padding-left:10pt"> % glob -directory e:/temp ~* e:/temp/~abc.txt % glob e:/temp/~* e:/temp/~abc.txt % cd e:/temp % glob [pwd]/~* E:/Temp/~abc.txt </pre></code> Just this one is a bit confusing (I know it is a bit "ambiguous", but...): <code><pre style="padding-left:10pt"> % glob ~* user "*" doesn't exist </pre></code> Despite ambiguity it looks still weird to me: <ol> <li> either the decision remains "path of pattern is absolute", it could be fixed to list all users/homes where caller is permitted.</li> <li> or the decision going either to "path of pattern considered as relative" under windows, it should behave like <code>glob [pwd]/~*</code> (so find all files starting with "~" in current directory).</li> </ol> Anyway (after fix) it could be additionally documented (with difference between unix/windows).
- login: "sebres"
- mimetype: "text/plain"
- comment changed to:
Ticket change [412d032407] (rid 259745) by serhiy.storchaka on 2026-10-21 10:03:39:
- icomment:
Since Tcl 9.0 (TIP 602, [cff0348cb6]) a path starting with <tt>~</tt> is an ordinary relative name, so <tt>file join</tt> and <tt>glob</tt> treat <tt>~abc.txt</tt> and <tt>~*</tt> as files in the directory. 8.6 keeps its documented tilde expansion. Closing as fixed in 9.0.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- icomment:
Ticket change [6d881d6316] (rid 260033) by serhiy.storchaka on 2026-10-22 17:19:31:
- closedate changed to: "2461334.919203785"
- closer changed to: "serhiy.storchaka"
- login: "serhiy.storchaka"