| Description: |
TCL version: 2.4.9
Platform: WIN2K SP4
tcllib: 1.7
In the course of writing a script on the win2k
platform, I've
come across a bug in the implementation of fileutil::find
I'm not sure if it's an issue under *unix, but I
suspect it is...
If a directory has a file that starts with a . (like
.splintrc)
then fileutil::find will list it twice!
To reproduce:
1. Create a clean directory
2. Start a tcl shell, and go to that dir
3. package require fileutil
4. fileutil::touch .splintrc
5. fileutil::find .
the .splintrc file is listed twice
The implementation of find in tcllib uses [glob
-nocomplain * .*]
which explains the problem.
It might be better to use [glob nocomplain *] as
Windows does not
see the . and .. anyways.
I suspect the problem may be there under *unix as well,
so the
search pattern may be better expressed as [glob
-nocomplain * . ..]
Ralph
|