Overview
| Artifact ID: | 161b58bdd8b875076aed380abf312f3fed502250 |
|---|---|
| Ticket: | 2806250fffffffffffffffffffffffffffffffff
glob, tilde string representation anomaly |
| User & Date: | juliannoble on 2009-06-14 16:57:33 |
Changes
- assignee changed to: "vincentdarley"
- cmimetype changed to: "text/plain"
- comment changed to:
When a filename contains a tilde character 'file exists' may falsely return zero. The bug occurs when the filename as returned from glob is used. Any call to 'file normalize' - even without using the returned value will cause a subsequent 'file exists' to correctly return 1. When the path is entered directly in tclsh, or hardcoded into a script, file exists correctly returns 1. set folder {/usr/local/test/} set files [glob -dir $folder -type f *] foreach f $files { #puts [file normalize $f] puts "$f exists: [file exists $f]" } Simply create a text file with the name "~test.txt" in the test folder. With the 1st puts commented, the output is: /usr/local/test/~test.txt exists: 0 With the puts uncommented, the output is: /usr/local/test/~test.txt /usr/local/test/~test.txt exists: 1 Tested on FreeBSD 8.6b1.1 2009-06-14 checkout. - foundin changed to: "obsolete: 8.6b1.1"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "juliannoble"
- subsystem changed to: "37. File System"
- title changed to:
glob, 'file exists', 'file normalize' interaction with tilde
- type changed to: "Bug"