Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 918473072fc4c75782053191a0ec2ee13a09188f
Ticket: 218415ffffffffffffffffffffffffffffffffff
Win95 path slash bug fix
User & Date: nobody on 2000-10-26 00:57:17
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. 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
    
  4. foundin changed to: "obsolete: 8.3.1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "37. File System"
  10. title changed to: "Win95 path slash bug fix"
  11. type changed to: "Bug"