Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d81d88f961536898e3b6a1690c9cb3ae2ba33c4d523109317bd23489f34e504c
Ticket: 108904173c1a823a20823885c7b29ab536434a5a
glob and file normalize inconsistencies on case insensitive filesystem
User & Date: sebres on 2026-03-16 10:43:34
Changes

  1. closedate changed to: "2461115.9469272802"
  2. closer changed to: "sebres"
  3. icomment:
    As already said in chat, it works exactly as expected.
    
    The FS on windows is case-insensitive...<br/>
    The uniqueness is if $path is equal $path and only $path...<br/>
    Using case-insensitive comparison operations (e. g. [string equal -nocase]) this equality has been proven.
    
    The "anomaly with the curly brace glob mechanism" from your comment is also not the anomaly, if one consider that the uniqueness is given only in a case-insensitive way (-nocase). The values are different, because windows API for glob cannot handle curly braces directly, so it happens on tcl-side, and since the file exists, the return value is different. The picture would change again, if you would try it with a wildcard like {SDX{1,2}.*}, because then it'd try curly braces against the listing from iterating API calls.
    
    Just note that because uniqueness is guaranteed (in case-insensetive manner) and iterating API calls are time-expensive and costly, glob would avoid iterations unless necessary.
    
    The normalization has also nothing to do with the case-sensitivity...<br/>
    It is about resolving of ".." segments, relative or volume-relative paths, links, wrapping backslash to slash, etc... nothing else.
    
    Regarding WSL, it also works as expected, because the case-sensitivity of mount is different to case-sensitivity of origin file system.<br/>
    Therefore the exact glob for {SDX1.bat} find the file, but for {[S]DX1.bat} or some wildcard the glob must iterate over directory listing returned from FS, and in case-sensitive mount point the file simply doesn't exist, because it is "sdx1.bat".
    The issue of "anomaly" is therefore 
    
    
    Please also consider https://learn.microsoft.com/en-us/windows/wsl/case-sensitivity
    
    I'll close this as incorrect, sorry.
    
  4. login: "sebres"
  5. mimetype: "text/x-fossil-wiki"
  6. resolution changed to: "Invalid"
  7. status changed to: "Closed"