Artifacts Associated With Ticket 1750300fffffffff
Ticket change [530ad5a899] (rid 126415) by matzek on 2007-07-09 11:25:38:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Hi *, consider the following examples: * there is a plain file TAGS in the current directory: % glob -- TAGS tags Tags TAGS % glob -types {} -- TAGS tags Tags TAGS tags Tags * there is _no_ file "urgent" in the current directory: % glob -types {} -- U* no files matched glob pattern "*U*" % glob -types {} -- URGENT Urgent URGENT Urgent Seems an empty types list together with queries without patterns just returns the queries... % set tcl_patchLevel 8.4.14 Operating systems: Linux, AIX, HP-UX and Solaris kind regards -- Matthias Kraft - foundin initialized to: "obsolete: 8.4.14"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "matzek"
- subsystem initialized to: "37. File System"
- title initialized to: "Unexpected [glob] result, when types list is empty"
- type initialized to: "Bug"
Ticket change [172e79f15e] (rid 122445) by matzek on 2007-07-09 18:33:41:
- icomment:
Logged In: YES user_id=330806 Originator: YES the second example: the query was *U* of cause. Got one line too less with CnP and then typed the missing line :-/ ... kind regards -- Matthias Kraft
- login: "matzek"
- mimetype: "text/plain"
- username: "matzek"
- icomment:
Ticket change [ee273c6f11] (rid 104033) by dkf on 2007-07-24 01:06:43:
- priority changed to: "8"
Ticket change [7b9ad97585] (rid 96936) by georgeps on 2007-12-15 04:54:53:
- icomment:
Logged In: YES user_id=585068 Originator: NO Cool bug: % cd / % glob -types {} -- TMP tmp TMP tmp % file exists TMP 0 % glob -- TMP tmp tmp Here's a patch that fixes it: Index: tclFileName.c =================================================================== RCS file: /cvsroot/tcl/tcl/generic/tclFileName.c,v retrieving revision 1.86 diff -u -r1.86 tclFileName.c --- tclFileName.c 13 Dec 2007 15:23:17 -0000 1.86 +++ tclFileName.c 14 Dec 2007 21:46:51 -0000 @@ -1412,6 +1412,11 @@ */ Tcl_ListObjLength(interp, typePtr, &length); + + if (length <= 0) { + goto skipTypes; + } + globTypes = (Tcl_GlobTypeData*) TclStackAlloc(interp,sizeof(Tcl_GlobTypeData)); globTypes->type = 0; @@ -1529,6 +1534,7 @@ } } +skipTypes: /* * Now we perform the actual glob below. This may involve joining together * the pattern arguments, dealing with particular file types etc. We use a - login: "georgeps"
- mimetype: "text/plain"
- username: "georgeps"
- icomment:
Ticket change [ae08e55481] (rid 101560) by matzek on 2008-07-01 23:00:42:
- assignee changed to: "dgp"
- foundin changed to: "obsolete: 8.5.3"
- icomment:
Logged In: YES user_id=330806 Originator: YES This one still persists in 8.5.3 ... Maybe someone could fix it one way or another. Thanks -- Matthias Kraft
- login: "matzek"
- mimetype: "text/plain"
- username: "matzek"
Ticket change [b1af39ae9f] (rid 98189) by dgp on 2008-08-14 01:15:21:
- closedate changed to: "2008-08-13T18:15:21"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Originator: NO fix committed to all active branches.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"
Ticket change [dabf0db05d] (rid 107848) by das on 2008-08-14 06:57:52:
- icomment:
Logged In: YES user_id=90580 Originator: NO the tests added for this bug depend on the filesystem being case sensitive, which is not the case everywhere, e.g. not with HFS+ on Mac OS X, it does not seem necessary to test for the fix in this way ==== fileName-20.1 Bug 1750300 FAILED ==== Contents of test case: llength [glob -nocomplain -directory $d -- TAGS tags Tags] ---- Result was: 3 ---- Result should have been (exact matching): 1 ==== fileName-20.1 FAILED ==== fileName-20.2 Bug 1750300 FAILED ==== Contents of test case: llength [glob -nocomplain -directory $d -types {} -- TAGS tags Tags] ---- Result was: 3 ---- Result should have been (exact matching): 1 ==== fileName-20.2 FAILED - login: "das"
- mimetype: "text/plain"
- priority changed to: "9 Immediate"
- status changed to: "Open"
- username: "das"
- icomment:
Ticket change [d443203719] (rid 123414) by dgp on 2008-08-14 11:10:12:
- icomment:
Logged In: YES user_id=80530 Originator: NO You're right; I simply copied the test cases out of the bug report being too lazy to invent my own. I'll get these tests fixed tomorrow.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [3707271b9f] (rid 107204) by dgp on 2008-08-14 20:10:40:
- closedate changed to: "2008-08-14T13:10:40"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Originator: NO more portable tests committed.
- login: "dgp"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "dgp"