Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 60e65b50096da34fa3f919207ee38b696a746c7a
Ticket: 535621ffffffffffffffffffffffffffffffffff
clear ~ cache when ::env(HOME) changes
User & Date: dgp on 2002-03-27 08:00:10
Changes

  1. assignee changed to: "vincentdarley"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    The normalizedPath cached inside a "pathPtr" object
    needs to be invalidated when the raw string form
    of the path starts with ~ and the value of ::env(HOME)
    changes.  Here's a demo session of the problem:
    
    First, the working code in 8.3:
    
    % info patch
    8.3.4
    % proc test {} {
        set ::env(HOME) /home/dgp
        puts "Parent of $::env(HOME)"
        catch {file dirname ~} parent
        puts "is $parent"
        set ::env(HOME) /usr/local/src
        puts "Parent of $::env(HOME)"
        catch {file dirname ~} parent
        puts "is $parent"
    }
    % test
    Parent of /home/dgp
    is /home
    Parent of /usr/local/src
    is /usr/local
    
    Compare with the broken 8.4:
    
    % info patch
    8.4a5
    % proc test {} {
        set ::env(HOME) /home/dgp
        puts "Parent of $::env(HOME)"
        catch {file dirname ~} parent
        puts "is $parent"
        set ::env(HOME) /usr/local/src
        puts "Parent of $::env(HOME)"
        catch {file dirname ~} parent
    % test
    Parent of /home/dgp
    is /home
    Parent of /usr/local/src
    is /home
    
    
  4. foundin changed to: "obsolete: 8.4a5"
  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: "clear ~ cache when ::env(HOME) changes"
  11. type changed to: "Bug"