Skip to content
Tcl Source Code History Of Ticket e860418c
Login

History Of Ticket e860418c

Artifacts Associated With Ticket e860418c

  1. Ticket change [9ffd549a83] (rid 253717) by apnadkarni on 2026-05-21 06:58:31:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. comment initialized to:
      Originally reported by @JulianNoble in the discussion in unrelated issue [596936dd2d](https://core.tcl-lang.org/tcl/tktview/596936dd)
      
      ```
      When you do a glob -dir $dir -tail on a dir ending in a slash - it can return /name instead of just name 
      
      Then the file join fails to work as it takes the name as an absolute path and doesn't add the dir.
      
       #with trailing slash in path
       % set path {C:\Program Files\PowerShell\7}
       C:\Program Files\PowerShell\7
       % tcl::unsupported::representation $path
       value is a pure string with a refcount of 4, object pointer at 0x1ea036f3270, string representation "C:\Program Fi..."
       % append path \\
       C:\Program Files\PowerShell\7\
       % tcl::unsupported::representation $path
      value is a utf32string with a refcount of 2, object pointer at 0x1ea036ef2e0, internal representation 0x1ea038c70b0:0x0, string representation "C:\Program Fi..."
       % glob -dir $path -tail pwsh.exe
       /pwsh.exe
      
      
       
       #without trailing slash 
       % set path {C:\Program Files\PowerShell\7}
       C:\Program Files\PowerShell\7
       % tcl::unsupported::representation $path
      value is a pure string with a refcount of 5, object pointer at 0x1ea036f3270, string representation "C:\Program Fi..."
       % glob -dir $path -tail pwsh.exe
       pwsh.exe
      
      
      Whether or not a trailing slash should strictly exist at the end of a path - I believe it to be fairly common on windows (some installers do it) and it should work.
      
      Tcl8.5 on the other hand does it correctly:
      
      % glob -dir "c:\\" -tail windows-version.txt
      windows-version.txt
      
      versus testing in 8.6, 8.7, 9.0
      % glob -dir "c:\\" -tail windows-version.txt
      /windows-version.txt
      ```
      
    5. foundin initialized to: "8.6"
    6. is_private initialized to: "0"
    7. login: "apnadkarni"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "apnadkarni"
    14. subsystem initialized to: "- New Builtin Commands"
    15. title initialized to:
      glob -dir $dir -tail returns name with leading / if $dir ends in a /
      
    16. type initialized to: "Bug"
  2. Ticket change [24e277f1ea] (rid 253849) by apnadkarni on 2026-05-24 09:13:24:

    1. assignee changed to: "apnadkarni"
    2. icomment:
      Forward slashes seem to work fine.
      
      ```
      % glob -dir c:/ -tail windows
      windows
      ```
      
      And without `-tail` output seem ok but weird, unnecessary escaping.
      
      ```
      % glob -dir c:\\ windows
      {c:\/windows}
      ```
      
    3. login: "apnadkarni"
    4. mimetype: "text/x-markdown"
  3. Ticket change [282f0831dc] (rid 253855) by apnadkarni on 2026-05-24 11:19:56:

    1. icomment:
      And my second example, which I thought was cosmetic, is also a bug (double escapes).
      
      Proposed fix for both in bug-e860418c branch.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  4. Ticket change [867a2379f6] (rid 253901) by apnadkarni on 2026-05-25 11:01:34:

    1. closedate changed to: "2461185.9594237036"
    2. closer changed to: "apnadkarni"
    3. icomment: "Fixed in [9f84d3ca4d] for 9.0.4 onward."
    4. login: "apnadkarni"
    5. mimetype: "text/x-fossil-plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"