Artifacts Associated With Ticket 858937ffffffffffffffffffffffffffffffffff
Ticket change [9b7cee1311] (rid 111135) by cjmcdonald on 2003-12-12 14:44:27:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- comment initialized to:
There are some problems with the processing of file paths containing a ~ tilde character. Tcl 8.4.5 - Unix (Solaris) and Windows (NT4). ------------------------------------------- 1) "file normalize" crashes if an invalid user name is specified: $ tclsh % file normalize ~baduser/readme.txt Segmentation fault (core dumped) ------------------------------------------- 2) For file names which actually start with a tilde the "glob -tails" processing is inconsistent with "file tail": If I have a file /home/mcdonald/temp/~test.dat, then "file tail" produces "./~test.dat", which subsequently can be used correctly with "file join" in order to reconstruct a full file path: $ tclsh % set fname [file tail /home/mcdonald/temp/~test.dat] ./~test.dat % set fspec [file join /home/mcdonald/temp $fname] /home/mcdonald/temp/~test.dat But "glob -tails" returns a file list including "~test.dat", which is assumed to be an absolute file specification by "file join": $ tclsh % set dir /home/mcdonald/temp /home/mcdonald/temp % set fnames [glob -tails -directory $dir *.dat] ~test.dat xyzzy.dat % set fspec [file join $dir [lindex $fnames 0]] ~test.dat So the output from "glob -tails" cannot subsequently be used reliably to reconstruct full file paths with "file join". I think that for files starting with a tilde character "glob -tails" should return ./~test.dat, the same as "file join". ------------------------------------------- 3) The filename.n manpage states in the "Tilde Substitution" section that "The Macintosh and Windows platforms do not support tilde substitution when a user name follows the tilde." That has not been the case on Windows for several releases e.g. ~mcdonald/readme.txt works on Windows.
- foundin initialized to: "obsolete: 8.4.5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "cjmcdonald"
- subsystem initialized to: "36. Pathname Management"
- title initialized to:
problems with file paths containing tilde character
- type initialized to: "Bug"
Ticket change [1d963d9846] (rid 90838) by vincentdarley on 2003-12-12 23:27:16:
- icomment:
Logged In: YES user_id=32170 It's best if you can report bugs separately, if you can. But... (1) Bad bug -- I can reproduce it and will set about fixing it. (2) There have been discussions on this before. Also note the long-standing behaviour of good-old 'glob *' which also doesn't do anything special with '~'. The conclusions last time this was discussed were that this is not a bug, and it is easy for the user to deal with anyway. (3) That's a good point and we should update that man page, and also probably update 'glob's manpage to indicate that (2) is not a bug. Thanks!
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [d7127e1cab] (rid 123916) by vincentdarley on 2003-12-13 00:26:20:
- closedate changed to: "2003-12-12T17:26:20"
- closer changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=32170 Thanks -- fixed all these issues (although number (2) perhaps not in the way you would desire).
- login: "vincentdarley"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "vincentdarley"
Ticket change [9afca86877] (rid 111045) by vasiljevic on 2004-03-05 19:22:23:
- foundin changed to: "obsolete: 8.4.6"
- icomment:
Logged In: YES user_id=95086 I have opened this one again. I strongly think that the original poster is right, i.e. [glob -tails] should produce paths which can be safely processed by [file] commands in respect to tilde-filenames. I would really appreciate to hear about why's and even more about why not's. Zoran
- login: "vasiljevic"
- mimetype: "text/plain"
- resolution changed to: "Remind"
- status changed to: "Open"
- username: "vasiljevic"
Ticket change [95b41de36c] (rid 106198) by vincentdarley on 2004-03-08 01:49:27:
- assignee changed to: "vasiljevic"
- icomment:
Logged In: YES user_id=32170 I think the best solution is for interested parties to file a TIP to make the "glob" behaviour change, and see if you can convince the TCT. I actually have no strong feelings either way, but since I'm not on the TCT, I'm not the one you have to convince anyway.
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
Ticket change [8733133c4b] (rid 131656) by vasiljevic on 2004-03-08 02:07:08:
- icomment:
Logged In: YES user_id=95086 Vince, this sounds as a reasonable idea. The response on the c.l.t has shown that people would rather see [file] command *not* treating the tilde-files, not the [glob] itself. I do not personaly care wether it is this way or another. The main point is to make the entire beast *safe*. As it is now, it is very easy to get trapped and produce lots of damage. Lets see if something pops out on the c.l.t. and if we can get some consensus what to do (if at all). I will leave this bug-report on "remind" state for some time. After we get some sort of a direction, the TIP will be on the way.
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"
- icomment:
Ticket change [29ea6cdaea] (rid 118466) by dgp on 2009-08-13 04:23:14:
- assignee changed to: "dgp"
- closedate changed to: "2009-08-12T21:23:14"
- closer changed to: "dgp"
- icomment:
allow_comments - 1 The remaining open issue in this report is duplicated in 2511011. Continue tracking it there.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"