Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 35c01f1313437b52e1e43c23069cf1afa4929dab
Ticket: 956063ffffffffffffffffffffffffffffffffff
[file dirname] broken
User & Date: vincentdarley on 2004-05-19 22:43:08
Changes

  1. icomment:
    
    
    File Added - 87657: filedirname.diff
    
    Logged In: YES 
    user_id=32170
    
    I can get the problem to occur on windows, quite simply:
    
    test cmdAH-8.46 {Tcl_FileObjCmd: dirname} {
        set f [file normalize [info nameof]]
        file exists $f
        set res1 [file dirname [file join $f foo/bar]]
        set res2 [file dirname "${f}/foo/bar"]
        if {$res1 eq $res2} {
    set res "ok"
        } else {
            set res "file dirname problem, $res1, $res2 not equal"
        }
        set res
    } {ok}
    
    I've attached an alternative patch which changes the
    behaviour of TclPathPart.
    
    For what it's worth, TclPathPart's optimization is what
    really introduced the bug so the obvious place to me to fix
    it is there.  However, I'm interested to look at your patch
    and see how you fixed it in a different way (just no time
    today).
    
    
    
    
  2. login: "vincentdarley"
  3. mimetype: "text/plain"
  4. username: "vincentdarley"