Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: efc530a87c52d7b05d9ccdc0429ef6b4b15d3912394a1d8f7d8c1b100094b14f
Ticket: 3e25ac512e9eeb8788028264c400238fcf425238
[file] inconsistent handling of VFS/..
User & Date: dgp on 2018-06-28 19:21:20
Changes

  1. icomment:
    
    There seems to be several problems lurking here and untangling them
    all is going to be a knotty problem.
    
    The first looks like something already found and addressed by sebres,
    the routine TclFSCwdIsNative() isn't written to be self-initializing,
    so it has bizarre shifts in behavior when run both before and after something
    like a [pwd] or anything else that gets Tcl's "current working directory"
    machinery up and properly running.
    
    Second, the unix implementation of TclNativeCreateNativeRep() branches
    on the return value of TclFSCwdIsNative(). It looks like this is an attempt
    to detect and optimize for the case when a relative path value can be
    converted directly into native form. The trouble is the logic is not limited
    to relative paths, so you have a situation where absolute paths sometimes
    take one branch, and sometimes another with the possibilty of inconsistent
    results.
    
    Third, when paths are normalized before getting converted to native form,
    and they include the "/.." substring, the answer is just wrong as reported
    separately in ticket 961646.
    
    There's probably more.
    
  2. login: "dgp"
  3. mimetype: "text/plain"