Overview
| Artifact ID: | 918473072fc4c75782053191a0ec2ee13a09188f |
|---|---|
| Ticket: | 218415ffffffffffffffffffffffffffffffffff
Win95 path slash bug fix |
| User & Date: | nobody on 2000-10-26 00:57:17 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 5495 Bug Version: 8.3.1 SubmitDate: '2000-05-15' LastModified: '2000-05-17' Severity: SER Status: Closed Submitter: angie ChangedBy: hobbs OS: All Windows OSVersion: Windows 95 FixedDate: '2000-10-25' ClosedDate: '2000-05-17' Name: Mark Jordan DesiredBehavior: PROBLEM ~~~~~~~ Using backward slashes actually BREAKS some stuff on Windows 95/98. Doing a SetCurrentDirectory("\\machine\share\dirname"); sets the current drive to 0 - invalid. Doing a SetCurrentDirectory("//machine/share/dirname"); does not change the current drive. Using open with an invalid current drive fails, even for absolute paths! CHANGES ~~~~~~~ 1. In Tcl_TranslateFileName(interp, name, bufferPtr), the following pieces of code are #ifdef'ed out. #ifdef NO_SLASH_BUGFIX register char *p; #endif #ifdef NO_SLASH_BUGFIX if (tclPlatform == TCL_PLATFORM_WINDOWS) { for (p = Tcl_DStringValue(bufferPtr); *p != '\0'; p++) { if (*p == '/') { *p = '\\'; } } } #endif FILES AFFECTED ~~~~~~~~~~~~~~ tcl8.3.1\generic\tclFileName.c Patch: diff -c -r tcl8.3.1/generic/tclFileName.c /home5/pubseq/share/src/tcl8.3.1/generic/tclFileName.c *** tcl8.3.1/generic/tclFileName.cThu Apr 20 00:24:52 2000 --- /home5/pubseq/share/src/tcl8.3.1/generic/tclFileName.cMon May 8 14:06:45 2000 *************** *** 1009,1015 **** --- 1009,1017 ---- Tcl_DString *bufferPtr;/* Uninitialized or free DString filled * with name after tilde substitution. */ { + #ifdef NO_SLASH_BUGFIX register char *p; + #endif /* * Handle tilde substitutions, if needed. *************** *** 1053,1058 **** --- 1055,1070 ---- * some system interfaces don't accept forward slashes. */ + #ifdef NO_SLASH_BUGFIX + /* + * Using backward slashes actually BREAKS some stuff on Windows 95/98. + * Doing a SetCurrentDirectory("\\machine\share\dirname"); sets the + * current drive to 0 - invalid. Doing a + * SetCurrentDirectory("//machine/share/dirname"); does not change the + * current drive. Using open with an invalid current drive fails, + * even for absolute paths! + */ + if (tclPlatform == TCL_PLATFORM_WINDOWS) { for (p = Tcl_DStringValue(bufferPtr); *p != '\0'; p++) { if (*p == '/') { *************** *** 1060,1065 **** --- 1072,1078 ---- } } } + #endif return Tcl_DStringValue(bufferPtr); } \f This is not at all the correct behavior for the user's machine. The code is 100% correct, as backed by the MSDN and correct behavior on others machines. It is possible that in the user's case above, the machine they are trying to access requires password authentication, which aren't handled and may return the 0. -- 05/17/2000 hobbs - foundin changed to: "obsolete: 8.3.1"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "37. File System"
- title changed to: "Win95 path slash bug fix"
- type changed to: "Bug"