Overview
| Artifact ID: | d0927f230d9f0f18567592a200f796fc14c47f13 |
|---|---|
| Ticket: | 2918610fffffffffffffffffffffffffffffffff
Wrong file opened |
| User & Date: | magv on 2009-12-21 11:28:03 |
Changes
- assignee changed to: "andreas_kupries"
- cmimetype changed to: "text/plain"
- comment changed to:
Here's a stripped down code snippet: set root somedir exec rm -rf $root exec mkdir -p $root exec touch $root/x.y file normalize anything foreach fn [glob $root/x.y] { set ofn [file rootname $fn] set fl [open $ofn {WRONLY CREAT}] puts $fl "something" close $fl } puts [exec ls $root] I expect this code to put "something" into somedir/x, and then print x and x.y. Instead it puts "something" into somedir/x.y, and prints x.y; somedir/x is not created, even though $ofn is somedir/x. I tried this code in the following environments: * FreeBSD/i386 7-STABLE, Tcl 8.4.19 -- works as expected * FreeBSD/i386 7-STABLE, Tcl 8.5.8 -- fails as described * FreeBSD/i386 7-STABLE, Tcl 8.6-b1 -- fails as described * FreeBSD/amd64 8.0-RC2, Tcl 8.5.8 -- fails as described * Windows XP, ActiveTcl 8.5.8 -- works as expected Alexandre Ferrieux was kind enough to test in another environment [1]: * Windows/MinGW, Tcl 8.5-HEAD -- works as expected Note that removing the void [file normalize], replacing glob with it's value, or removing foreach loop also makes it work as expected. I will try to run the code on other systems to see if it's specific to FreeBSD (maybe FreeBSD port patches are to blame). [1] http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/859e950831fa3e9b - foundin changed to: "obsolete: 8.5.8"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "magv"
- subsystem changed to: "24. Channel Commands"
- title changed to: "Wrong file opened"
- type changed to: "Bug"