<i>glob -directory -join bug in VFS</i> status still Open with 4 other changes
by
.
D 2001-08-21T01:07:56
J icomment Logged\sIn:\sNO\s\n\nI've\sfound\sthe\sproblem\s--\sthe\sbug\sactually\sexisted\sin\s8.3\s\nbut\swas\sonly\sexercised\sdue\sto\sFS\soverhaul.\s\sI'll\scommit\sthe\s\nfixes\s(to\sWin/Mac\stoo)\swhen\sI\scommit\ssome\sother\sFS\s\nchanges.\s\sIn\sthe\smeantime,\sif\syou\swant\sa\sfix,\sreplace\sthe\s\nappropriate\sblock\sof\scode\sin\stclUnixFile.c\swith\sthis:\n\n\s\s\s\sif\s(types\s!=\sNULL)\s{\nstruct\sstat\sbuf;\n\nif\s(types->perm\s!=\s0)\s{\n\s\s\s\sif\s(TclpStat(fname,\s&buf)\s!=\s0)\s{\n/*\s\n\s*\sEither\sthe\sfile\shas\sdisappeared\s\nbetween\sthe\n\s*\s'readdir'\scall\sand\s\nthe\s'TclpStat'\scall,\sor\n\s*\sthe\sfile\sis\sa\slink\sto\sa\sfile\s\nwhich\sdoesn't\n\s*\sexist\s(which\swe\scould\sascertain\s\nwith\n\s*\sTclpLstat),\sor\sthere\sis\ssome\s\nother\sstrange\n\s*\sproblem.\s\sIn\sall\sthese\scases,\swe\s\ndefine\sthis\n\s*\sto\smean\sthe\sfile\sdoes\snot\smatch\s\nany\sdefined\n\s*\spermission,\sand\stherefore\sit\sis\s\nnot\s\n\s*\sadded\sto\sthe\slist\sof\sfiles\sto\s\nreturn.\n\s*/\ntypeOk\s=\s0;\n\s\s\s\s}\n\s\s\s\s\n\s\s\s\s/*\s\n\s\s\s\s\s*\sreadonly\smeans\sthat\sthere\sare\sNO\s\nwrite\spermissions\n\s\s\s\s\s*\s(even\sfor\suser),\sbut\sexecute\sis\sOK\s\nfor\sanybody\n\s\s\s\s\s*/\n\s\s\s\sif\s(typeOk\s&&\s(\n((types->perm\s&\s\nTCL_GLOB_PERM_RONLY)\s&&\n(buf.st_mode\s&\s\n(S_IWOTH|S_IWGRP|S_IWUSR)))\s||\n((types->perm\s&\sTCL_GLOB_PERM_R)\s&&\n(TclpAccess(fname,\sR_OK)\s!=\s\n0))\s||\n((types->perm\s&\sTCL_GLOB_PERM_W)\s&&\n(TclpAccess(fname,\sW_OK)\s!=\s\n0))\s||\n((types->perm\s&\sTCL_GLOB_PERM_X)\s&&\n(TclpAccess(fname,\sX_OK)\s!=\s\n0))\n))\s{\ntypeOk\s=\s0;\n\s\s\s\s}\n}\nif\s(typeOk\s&&\s(types->type\s!=\s0))\s{\n\s\s\s\sif\s(types->perm\s==\s0)\s{\n/*\sWe\shaven't\syet\sdone\sa\sstat\son\s\nthe\sfile\s*/\nif\s(TclpStat(fname,\s&buf)\s!=\s0)\s{\n\s\s\s\s/*\sPosix\serror\soccurred\s*/\n\s\s\s\stypeOk\s=\s0;\n}\n\s\s\s\s}\n\s\s\s\sif\s(typeOk)\s{\n/*\n\s*\sIn\sorder\sbcdpfls\sas\sin\s'find\s-t'\n\s*/\nif\s(\n\s\s\s\s((types->type\s&\s\nTCL_GLOB_TYPE_BLOCK)\s&&\n\s\s\s\sS_ISBLK(buf.st_mode))\s||\n\s\s\s\s((types->type\s&\s\nTCL_GLOB_TYPE_CHAR)\s&&\n\s\s\s\sS_ISCHR(buf.st_mode))\s||\n\s\s\s\s((types->type\s&\s\nTCL_GLOB_TYPE_DIR)\s&&\n\s\s\s\sS_ISDIR(buf.st_mode))\s||\n\s\s\s\s((types->type\s&\s\nTCL_GLOB_TYPE_PIPE)\s&&\n\s\s\s\sS_ISFIFO(buf.st_mode))\s\n||\n\s\s\s\s((types->type\s&\s\nTCL_GLOB_TYPE_FILE)\s&&\n\s\s\s\sS_ISREG(buf.st_mode))\n#ifdef\sS_ISSOCK\n\s\s\s\s||\s((types->type\s&\s\nTCL_GLOB_TYPE_SOCK)\s&&\n\s\s\s\sS_ISSOCK(buf.st_mode))\n#endif\n\s\s\s\s)\s{\n\s\s\s\s/*\sDo\snothing\s--\sthis\sfile\sis\s\nok\s*/\n}\selse\s{\n\s\s\s\stypeOk\s=\s0;\n#ifdef\sS_ISLNK\n\s\s\s\sif\s(types->type\s&\s\nTCL_GLOB_TYPE_LINK)\s{\nif\s(TclpLstat(fname,\s&buf)\s\n==\s0)\s{\n\s\s\s\sif\s(S_ISLNK\n(buf.st_mode))\s{\n\s\s\s\s\s\s\s\stypeOk\s=\s1;\n\s\s\s\s}\n}\n\s\s\s\s}\n#endif\n}\n\s\s\s\s}\n}\n\s\s\s\s}\n\n
J login nobody
J mimetype text/plain
J username nobody
K 451571ffffffffffffffffffffffffffffffffff
U nobody
Z 2e84255da135b9aed41fa2b8f3ea86a8