<i>file delete cannot delete nonempty directories on Windows 98</i> status still Open with 4 other changes
by
.
D 2001-02-17T02:51:53
J icomment I\sbelieve\sanother\ssymptom\sI\shave\sdiscovered\sis\srelevant.\sThe\sTclpStat()\sroutine\sreturns\sdifferent\sresults\sdepending\son\swhether\sit\sis\srunning\son\sW98\sor\sW2000/NT,\sdepending\son\swhat\stype\sof\spathname\sis\spassed\sto\sit.\sApparently\sW98\sdoes\snot\sperform\sas\sexpected\sby\sTclpStat()\sif\sthe\spathname\sis\sthe\sroot\sdrive\sof\sa\svolume\sshared\son\sanother\smachine\s(e.g.\s\\\\server\\volume).\sThis\scauses\sseveral\sparts\sof\sthe\sTcl\sfile\scommand\sto\smisbehave,\sincluding\s"file\sdelete"\sas\smentioned\sin\sthe\soriginal\sbug,\sand\s"file\sisdirectory"\sand\s"file\smkdir".\n\nThe\sfollowing\ssimple\sC\sprogram\scan\sbe\sused\sto\sshow\sthe\sdifference.\sCompile\sand\srun\sit\sas\sa\sconsole\sapp,\spassing\sa\sfilename\sas\sa\ssingle\sargument.\sIt\sreturns\sthe\sresults\sof\sa\sFindFirstFile()\scall\sand\sa\sGetFileAttributes()\scall\son\sthe\sfilename.\n\n#include\s<windows.h>\n#include\s<stdio.h>\n#include\s<sys/stat.h>\n\nint\smain(int\sargc,\schar*\sargv[])\n{\nif\s(argc>1)\s{\nDWORD\sattr\s=\sGetFileAttributes(argv[1]);\nprintf("flag\sfor\sdirectory\sis\s%08X",FILE_ATTRIBUTE_DIRECTORY);\n\s\s\s\sprintf("\\nattributes\sfrom\sGetFileAttributes(%s)\s:\s%08X",argv[1],attr);\nWIN32_FIND_DATA\sfindData;\nHANDLE\shandle\s=\sFindFirstFile(argv[1],&findData);\nif\s(handle\s!=\sINVALID_HANDLE_VALUE)\s{\nprintf("\\nattributes\sfrom\sFindFirstFile(%s):\s%08X",argv[1],\sfindData.dwFileAttributes);\n}\selse\s{\n\s\s\s\sprintf("\\nFindFirstFile(%s)\sreturned:\s%08X",argv[1],(DWORD)handle);\n}\nreturn\s0;\n}\s\nprintf("usage:\s%s\s<filename>",argv[0]);\nreturn\s1;\n}\n\n
J login jhilbert
J mimetype text/plain
J username jhilbert
K 226413ffffffffffffffffffffffffffffffffff
U jhilbert
Z 9d6bd3cd8f626018aba78be441e4994a