Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 40143fdf73fad5e699661673e5b66fb33ee1f36f
Ticket: 953284ffffffffffffffffffffffffffffffffff
normalized path cache gets outdated
User & Date: dgp on 2004-05-13 13:46:42
Changes

  1. assignee changed to: "vincentdarley"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    This test demos the problem.
    Filesystem paths violate 
    "everything is a string"
    Patch attached.
    
    test filesystem-1.42 {file normalisation: outdated
    cache} -setup {
        set w [makeDirectory wrong]
        makeFile wrong file $w
        set r [makeDirectory right]
        makeFile right file $r
        set link [file join [file dirname $w] link]
        file link $link wrong
    } -body {
        set p1 [file join $link file]       ;# $p1 and $p2
    have same (string)
        set p2 [file join $link file]       ;# value
        file normalize $p1          ;# cache the "wrong"
    normalized path
    
        file delete $link
        file link $link right       ;# change link reference
    
        # Because string values are the same, according to
    Tcl value
        # rules, these operations should produce consistent
    results.
        # They do not, because $p1 holds an outdated cached
    normalized
        # path, breaking "everything is a string".
        set result {}
        lappend result $p1
        set f [open $p1]
        lappend result [read -nonewline $f]
        close $f
        lappend result [file normalize $p1]
    
        lappend result $p2
        set f [open $p2]
        lappend result [read -nonewline $f]
        close $f
        lappend result [file normalize $p2]
    
    } -cleanup {
        file delete $link
        removeFile file $r
        removeDirectory right
        removeFile file $w
        removeDirectory wrong
    } -match glob -result\
    {*/link/file right */right/file */link/file right
    */right/file}
    
    
  4. foundin changed to: "obsolete: 8.5a2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "dgp"
  9. subsystem changed to: "37. File System"
  10. title changed to: "normalized path cache gets outdated"
  11. type changed to: "Bug"