Tcl Source Code

View Ticket
Login
Ticket UUID: 1119798
Title: Use of glob command does not use '-types f' switch
Type: Bug Version: obsolete: 8.4.9
Submitter: mpettigr Created on: 2005-02-10 03:34:54
Subsystem: 34. tcltest Package Assigned To: dgp
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2005-02-25 01:03:16
Resolution: Fixed Closed By: dgp
    Closed on: 2005-02-24 18:03:16
Description:
Problem: The tcltest package use of the glob command 
is too inclusive since it will match on directory names as 
well as file names.

For example if a directory listing is as follows:

all.tcl
b.txt
c.txt
foo [d]

where foo is a directory.  The command (assume all.tcl 
is 'standard' all.tcl as suggested in the tcltest doc):

tclsh all.tcl -file foo* 

will match and try to run the directory foo. 

Solution:

Add '-types f' switch to the use of glob commands in 
the tcltest package.  Note: The '-types f' is available in 
version 8.3 of Tcl so the 'package require Tcl 8.3' does 
not need to be updated.
User Comments: dgp added on 2005-02-25 01:03:16:
Logged In: YES 
user_id=80530

patch committed for 8.4.10 and 8.5a3.
(tcltest 2.2.8)

dgp added on 2005-02-24 05:38:41:

File Added - 122811: 1119798.patch

dgp added on 2005-02-24 05:38:32:
Logged In: YES 
user_id=80530

Here's a patch addressing this
report.  Please test and report back.

Attachments: