<i>glob of symlink returns incorrect err</i> status still Open with 4 other changes
by
.
D 2001-08-18T00:16:56
J icomment Logged\sIn:\sYES\s\nuser_id=32170\n\nglob,\sor\smore\sprecisely\s'TclDoGlob'\sin\stclFileName.c\s(near\s\nthe\svery\send\sof\sthe\sfile)\suses\sthis\spiece\sof\scode\sto\sdecide\s\nwhether\sto\sadd\sa\scomplete\sfile\sname\s(no\spattern\sinvolved)\s\nto\sthe\sresult:\n\n\s\s\s\sif\s(Tcl_Access(name,\sF_OK)\s==\s0)\s{\nthen\sadd\sto\sglob\sresult\n\s\s\s\s}\n\nThis\sdiffers\sto\sthe\spattern\smatching\scode\s\n(TclpMatchInDirectory)\swhich\swill\ssimply\sadd\sanything\s\nreturned\sby\sthe\sOS\s'opendir/readdir'\scombination,\swithout\s\nactually\schecking\swhether\sthe\sfile\sexists\s(unless\syou\spass\s\nin\sadditional\s'-types'\sarguments).\n\nSo,\sthe\ssolution\swould\sseem\sto\sbe\sto\schange\sthat\sTcl_Access\s\nto\ssomething\selse.\s\sOr\sat\sleast,\sif\sthe\saccess\sfails,\sto\s\ntry\s'lstat'\sinstead.\s\sCould\syou\stest\swhat\shappens\sif\syou\s\nreplace\sif\s(Tcl_Access\s..\s==\s0)\sby\s'if\s(Tcl_LStat(..)\s==\s\n0)'?\s\s(or\ssomething\slike\sthat)....\n\n\n
J login vincentdarley
J mimetype text/plain
J username vincentdarley
K 434876ffffffffffffffffffffffffffffffffff
U vincentdarley
Z bf1d303e1b4b9ca15b79ae5191a0a026