Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a4c316b1778a5375d87c7a695844f1d0d03a6b7abcd5bc28988f5cb926027a94
Ticket: b0682c3c2497e8f27f18e91686031dda055ed19c
glob error
User & Date: juliannoble2 on 2025-09-25 16:31:19
Changes

  1. icomment:
    I also see this on a recent 9.0.2 build 
    
    Paths such as Z:Basistests are volume-relative
    Tcl doesn't support the per-volume cwd - there are long-standing bugs in this area when changing drives in Tcl as compared to what happens in cmd.exe or powershell.
    
    
    If you cd to Z:/Basistests 
     for command 4 - you will see the Z:basistests entry is no longer present in the result.
     for command 5 - the 'couldn't read directory' error is not raised.
    
    glob with the -directory option, and no specific reference to volume-relative paths shouldn't change output based on the cwd.
    (and shouldn't return any volume relative paths)
    
    
    I've argued in a previous ticket that it may be worth considering removing volume-relative path support.
    I'd really prefer it was supported - but there are still footguns regarding the cd command and comparing glob output to external tools/commands view of things due to the occasional difference in ideas of what is the actual current working directory for a drive.
    
    The example given above of cd c: & cd Z:Basistests can be a problem with tcl8 too - as it can depend on what directory you were in when starting tclsh.
    
    Perhaps in this case we can at least make glob handle things better, even if a full fix-up of the volume-relative path problems isn't something anyone is able to delve into now.
    
  2. login: "juliannoble2"
  3. mimetype: "text/plain"