[file rootname] failure
Closed / Fixed1255156fffffffffffffffffffffffffffffffffCreated 21 years agoUpdated 21 years ago
Descriptionplain2005-08-09 17:58:17
When the result of a call to [glob]* is stored in a
variable, and then [file rootname] is performed on any
list element stored in that variable, [file rootname]
fails to remove the file extension of the list element.
The following script demonstrates the error (pathnames
may need to be adjusted):
# the following fails
set files [glob d:/temp/p*]
foreach file $files {
puts [file rootname $file]
}
# the following succeeds
foreach file [glob d:/temp/p*] {
puts [file rootname $file]
}
# the following fails
foreach file [lsort -dictionary [glob d:/temp/p*]] {
puts [file rootname $file]
}
*Donal Fellows notes on c.l.t. :
"the directory must be specified (either in the pattern
or through the -directory flag) and 'glob characters'
must be present in the input to [glob] to trigger the bug."
dkfplain2005-08-10 04:32:51
Logged In: YES user_id=79902 Err, it was already fixed by the time you submitted the bug. :^)
aric_bplain2005-08-10 05:12:20
Logged In: YES user_id=1326110 Now that's service! Many thanks.
Log in (anonymous is fine) to add a comment.