Skip to content
Tcl Source Code History Of Ticket 3185609
Login

History Of Ticket 3185609

Artifacts Associated With Ticket 3185609

  1. Ticket change [6b4d964d14] (rid 128304) by apnadkarni on 2011-02-18 08:38:41:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Ran into the following corner case as a result of a typo - if a path component contains "..." or (more than two dots), the normalized string is corrupted.
      (bug is WINDOWS specific)
      
      tkcon session:
      
      (tcl) 49 % pwd
      C:/Documents and Settings/ashok/My Documents/src/twapi-exp/twapi/tcl
      (tcl) 50 % file normalize [file join [pwd] ...]
      C:/Documents and Settings/ashok/My Documents/src/twapi-exp/twapi/tcltcl (more non-printable chars here)
      
      The problem was a broken calculation in TclpObjNormalizePath when UNICODE is defined. The patch to fix this is :
      
      *** tclWinFile.c.orig   2011-02-18 09:19:45.750000000 +0530
      --- tclWinFile.c        2011-02-18 13:45:03.750000000 +0530
      *************** TclpObjNormalizePath(
      *** 2778,2786 ****
                               * path segment and continue.
                               */
      
      !                       Tcl_DStringAppend(&dsNorm, (const char *)
      !                               ((WCHAR *)(nativePath + Tcl_DStringLength(&ds))
      !                               - dotLen), (int)(dotLen * sizeof(WCHAR)));
                          } else {
                              /*
                               * Normal path.
      --- 2778,2788 ----
                               * path segment and continue.
                               */
      
      !                       Tcl_DStringAppend(&dsNorm,
      !                                           ((const char *) nativePath) +
      !                                           Tcl_DStringLength(&ds) /* # bytes, not TCHARS */
      !                                           - (dotLen * sizeof(TCHAR)),
      !                                           (int)(dotLen * sizeof(WCHAR)));
                          } else {
                              /*
                               * Normal path.
      
      After patching, output is as follows :
      
      % file normalize [file join [pwd] ...]
      C:/Documents and Settings/ashok/My Documents/src/twapi-exp/twapi/tcl/...
      
      which matches Tcl 8.5 behavour.
      
      Note this behaviour has a separate issue - treatment of ... is different from Windows semantics. That is logged as a separate bug.
      
    4. foundin initialized to: "obsolete: 8.6b1.1"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "apnadkarni"
    10. subsystem initialized to: "36. Pathname Management"
    11. title initialized to:
      File normalization corner case of ... broken with -DUNICODE
      
    12. type initialized to: "Bug"
  2. Ticket change [e5bdeca8d6] (rid 104180) by nijtmans on 2011-02-18 16:14:41:

    1. assignee changed to: "nijtmans"
    2. icomment:
      Thank you! I'll take it up, as soon as the Tcl repository is committable again.
      
      
    3. login: "nijtmans"
    4. mimetype: "text/plain"
    5. username: "nijtmans"
  3. Ticket change [baf6bd781f] (rid 129402) by nijtmans on 2011-03-12 07:54:25:

    1. icomment:
      Fixed in trunk. Thanks!
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  4. Ticket change [2a13b97be1] (rid 118491) by nijtmans on 2011-03-12 07:54:26:

    1. closedate changed to: "2011-03-12T00:54:26"
    2. closer changed to: "nijtmans"
    3. icomment:
      
      
      allow_comments - 1
      
      
      
    4. login: "nijtmans"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "nijtmans"