Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8a504cc77eab8cc904e77e1afa417419f2f07494
Ticket: 3414754fffffffffffffffffffffffffffffffff
file join/normalize bugs violate EIAS
User & Date: strykaas on 2011-09-27 22:48:02
Changes

  1. assignee changed to: "vincentdarley"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Reproduced on WinXP SP3 with ActiveState 8.4 and 8.6 and Ubuntu 11.04 Tcl 8.5
    
    The following code produces unexpected results :
    
    ########################"
    # Bug #1 : why $foo1 != $foo2 !?
    cd /tmp
    
    set foo1 [file join [pwd] foo/]
    set foo2 [file join /tmp   foo/]
    
    puts "foo1=*$foo1*"
    puts "foo2=*$foo2*"
    
    # Bug #2 : why normalize works differently for the same actual string !?
    
    set fooFromStr "/tmp/foo/"
    if { $foo1 eq $fooFromStr } {
    puts "Yes, I'm not crazy, foo1 eq fooFromStr !"
    }
    puts "norm foo1  =*[file normalize $foo1     ]*"
    puts "normFormStr=*[file normalize $fooFromStr]*"
    ########################"
    
    Outputs is :
    
    foo1=*/tmp/foo/*
    foo2=*/tmp/foo*
    Yes, I'm not crazy, foo1 eq fooFromStr !
    norm foo1  =*/tmp/foo/*
    normFormStr=*/tmp/foo*
    
    There is two problems :
    1.There is no reason why [file join] would return different strings when the same parameter is passed two different ways.
    2.There is no reason why two identical strings would produce different results when [file normalize] is called with them as parameters.
    
    
    
    
  4. foundin changed to: "obsolete: 8.5.10"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "strykaas"
  10. subsystem changed to: "37. File System"
  11. title changed to: "file join/normalize bugs violate EIAS"
  12. type changed to: "Bug"