Overview
| Artifact ID: | 29a863dcf42bb6d256aae9d95e29dccb75ac84b3 |
|---|---|
| Ticket: | 979879ffffffffffffffffffffffffffffffffff
file isdirectory causing variable corruption? |
| User & Date: | ajpasadyn on 2004-06-25 17:36:03 |
Changes
- assignee changed to: "vincentdarley"
- cmimetype changed to: "text/plain"
- comment changed to:
After a call to "file isdirectory" certain paths no longer seem to exist. I observed this with Tcl 8.4.x on Win32, but not with Tcl 8.3.x. Something must be happening to the variable that is passed to file isdirectory. If I make sure that it's just a temporary string (as in TestFind2) the problem does not occur. Example: proc TestFind1 {d f} { set r1 [file exists [file join $d $f]] puts "TF1: [file join $d $f] found: $r1" puts "TF1: is dir a dir? [file isdirectory $d]" set r2 [file exists [file join $d $f]] puts "TF1: [file join $d $f] found: $r2" puts "" } proc TestFind2 {d f} { set r1 [file exists [file join $d $f]] puts "TF2: [file join $d $f] found: $r1" puts "TF2: is dir a dir? [file isdirectory [file join $d]]" set r2 [file exists [file join $d $f]] puts "TF2: [file join $d $f] found: $r2" puts "" } file mkdir [file join a b c] TestFind1 a [file join b . c] TestFind2 a [file join b . c] My output: TF1: a/b/./c found: 1 TF1: is dir a dir? 1 TF1: a/b/./c found: 0 TF2: a/b/./c found: 1 TF2: is dir a dir? 1 TF2: a/b/./c found: 1 - foundin changed to: "obsolete: 8.4.6"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "ajpasadyn"
- subsystem changed to: "37. File System"
- title changed to: "file isdirectory causing variable corruption?"
- type changed to: "Bug"