Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 649ee291372e669fb9ab2fc1e4201ffd1ed2c2b8ae4b076a28fdab1022d69a5a
Ticket: 108904173c1a823a20823885c7b29ab536434a5a
glob and file normalize inconsistencies on case insensitive filesystem
User & Date: juliannoble2 on 2026-03-16 12:12:21
Changes

  1. closedate changed to: "2461116.0085796411"
  2. closer changed to: "juliannoble2"
  3. icomment:
    Tell me is this behaviour reasonable? (strong opionion: it's not)
    
    
      C:/Users/sleek/AppData/Local/Apps/Tcl90b3/bin
      % set files [glob -dir C:/SDX SDX1.bat SDX1.bat]
      C:/SDX/SDX1.bat C:/SDX/SDX1.bat
      % lassign $files f1 f2
    
      % file normalize $f1
      C:/SDX/SDX1.bat
      % file normalize $f2
      C:/SDX/SDX1.bat
    
      % file normalize [string range $f1 0 end]
      C:/SDX/sdx1.bat
    
      % file normalize $f1
      C:/SDX/sdx1.bat
      % file normalize $f2
      C:/SDX/SDX1.bat
    
    This is a situation that script programmers can't be reasonably expected to reason about to produce reliable code.
    
    I wasn't telling you where the bug is exactly - and I'm willing to accept guidance that for reasons of practicality some things have to be the way they are - but at the very least (even without the 'string range' changing the result) this is an issue of serious underdocumentation of *highly surprising* effects and should at least be left open for others on the team to consider if documentation can be improved around this.
    
  4. login: "juliannoble2"
  5. mimetype: "text/plain"