Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c6759887aebae7d346c78db0f9386f3f96f9f8bf
Ticket: 961646ffffffffffffffffffffffffffffffffff
[file normalize] changes file reference
User & Date: vincentdarley on 2004-06-02 21:27:58
Changes

  1. icomment:
    Logged In: YES 
    user_id=32170
    
    I still tend to think this illustrates a bug in Tcl
    somewhere, since the above behaviour is not expected.  I now
    think it's due to some of the fs-optimization that was
    performed.  In particular, I think it's due to the 'if'
    block here in NativeCreateNativeRep:
    
        if (tsdPtr->cwdClientData != NULL) {
            /* The cwd is native */
    validPathPtr = Tcl_FSGetTranslatedPath(NULL, pathPtr);
        } else {
    /* Make sure the normalized path is set */
    validPathPtr = Tcl_FSGetNormalizedPath(NULL, pathPtr);
    Tcl_IncrRefCount(validPathPtr);
        }
    
    try making that 'if (0)' and see if the problem goes away.
    
    --
    
    Now, it's a separate issue as to what the desired behaviour
    is.  I see arguments for both approaches, really.  In
    particular, if, as you suggest the /../ interpretation is
    moved to the filesystem-specific layer (vastly complicating
    all filesystems), what behaviour should 'file normalize'
    have in this case?  How should 'file normalize' be documented?
    
    
    
    
  2. login: "vincentdarley"
  3. mimetype: "text/plain"
  4. username: "vincentdarley"