Overview
| Artifact ID: | 88c51b2a93281de3900245a33afc9ae80a3d2c5e |
|---|---|
| Ticket: | 226413ffffffffffffffffffffffffffffffffff
file delete cannot delete nonempty directories on Windows 98 |
| User & Date: | jhilbert on 2001-02-17 02:51:53 |
Changes
- icomment:
I believe another symptom I have discovered is relevant. The TclpStat() routine returns different results depending on whether it is running on W98 or W2000/NT, depending on what type of pathname is passed to it. Apparently W98 does not perform as expected by TclpStat() if the pathname is the root drive of a volume shared on another machine (e.g. \\server\volume). This causes several parts of the Tcl file command to misbehave, including "file delete" as mentioned in the original bug, and "file isdirectory" and "file mkdir". The following simple C program can be used to show the difference. Compile and run it as a console app, passing a filename as a single argument. It returns the results of a FindFirstFile() call and a GetFileAttributes() call on the filename. #include <windows.h> #include <stdio.h> #include <sys/stat.h> int main(int argc, char* argv[]) { if (argc>1) { DWORD attr = GetFileAttributes(argv[1]); printf("flag for directory is %08X",FILE_ATTRIBUTE_DIRECTORY); printf("\nattributes from GetFileAttributes(%s) : %08X",argv[1],attr); WIN32_FIND_DATA findData; HANDLE handle = FindFirstFile(argv[1],&findData); if (handle != INVALID_HANDLE_VALUE) { printf("\nattributes from FindFirstFile(%s): %08X",argv[1], findData.dwFileAttributes); } else { printf("\nFindFirstFile(%s) returned: %08X",argv[1],(DWORD)handle); } return 0; } printf("usage: %s <filename>",argv[0]); return 1; } - login: "jhilbert"
- mimetype: "text/plain"
- username: "jhilbert"