Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 07003b0052c4232a6d3df12ef293a4f0257adb4a
Ticket: c8d1585aa9ad549169b42c0fe36e5fbb7746db31
strange variable of variable evaluation in filesystem path (Windows only)
User & Date: anonymous on 2013-07-29 13:00:55
Changes

  1. closedate changed to: "2456503.04231243"
  2. closer changed to: "anonymous"
  3. icomment:
    @jan.nijtmans: No need to sorry, obviously I missed something here.
    
    >> source "$b/../b.tcl" ;#this one works on Windows, but doesn't on Linux
    > That this  works on Windows is actually a Windows bug, it shouldn't work at all!
    
    I suppose that on Windows such path "dir/.." is equal to ".", so "$b/../b.tcl" means "./b.tcl", which is OK in this case.
    
    > So, you are making two mistakes: 1) Assume that "set b {$a}" replaces $a with it's content
    
    I assumed that 'source "$b/../b.tcl"' replaces $b into string '$a', and then, somwhere inside 'source', '$a' into value of variable $a. However, it seems that in case of "dir/.." the 'dir' is just ignored (Windows only? seems like kind of optimization) and such path changed into ".", which makes it working on Windows.
    
    Well, finally I can concur with dgp on this too. Thanks!
    
  4. login: "anonymous"
  5. mimetype: "text/plain"