Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3da794009cf436a401123018adecbbdb4426ff84
Ticket: 997889ffffffffffffffffffffffffffffffffff
file normalize returns wrong path
User & Date: uring on 2004-07-26 08:43:01
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Run this example. It prints "/tmp/foo/bar" instead of
    "/tmp/xxx/bar" .
    
    #
    -----------------------------------------------------------
    cd /tmp                       ;# working directory
    file delete -force foo xxx    ;# make clean
    file mkdir foo/bar            ;# some directories
    file link xxx foo             ;# xxx -> foo
    
    set target xxx/bar            ;# store path of
    subdirectory in variable
    file isdirectory $target      ;# check xxx/bar
    file delete xxx               ;# now delete symlink
    file copy foo xxx             ;# recreate as copy of bar
    
    puts [file normalize $target]
    #
    ----------------------------------------------------------
    
    Comments:
    
    (1) uncomment "file isdirectory ..." and it's OK
    (2) change to "file isdirectory xxx/bar" and it's OK
    
    I assume that the path /tmp/foo/bar is cached in the
    variable "target" (in Tcl_Obj's internal representation).
    
    Having "string length $target" _after_ "file
    isdirectory $target"
    changes variable to string type and things are OK.
    
    
    -----
    Ulrich Ring - [email protected]
    
    
  4. foundin changed to: "obsolete: 8.4.6"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "uring"
  9. subsystem changed to: "16. Commands A-H"
  10. title changed to: "file normalize returns wrong path"
  11. type changed to: "Bug"