Overview
| Artifact ID: | 36b8a94f3dde5a10dd9e4bbe6984558917c4bedb |
|---|---|
| Ticket: | 2511011fffffffffffffffffffffffffffffffff
[glob] can return non-existing filenames |
| User & Date: | cwjolly on 2009-02-24 06:00:39 |
Changes
- icomment:
Seems to me since you do create the file and glob finds it that it is not a bug with glob but rather with file exists. Its the "file exists" command that does not see the file. Since tcl supports ~ expansion it is likely that the home directory is being appended to the remainder of the filename and sois not found. e.g. if the home directory == /home/chuck then ~test is transformed to /home/chucktest prior to checking for existance. I tried the following using 8.5.0 and it points to the ~ expansion as the culprit for a number of path associated commands. At the bottom it would appear that as suggested above that appending ./ to each file will allow file exists (and other commands to succeed) : % info pa 8.5.0 % package require fileutil 1.13.5 % fileutil::touch ~test user "test" doesn't exist % fileutil::touch \~test user "test" doesn't exist % exec touch ~test % glob ~* user "*" doesn't exist % glob *test ~test mytest % file exists ~test 0 % file normalize ~test user "test" doesn't exist % file normalize \~test user "test" doesn't exist % file exists [file normalize ~test] user "test" doesn't exist % file exists [file normalize ./~test ] 1
- login: "cwjolly"
- mimetype: "text/plain"
- username: "cwjolly"