Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0c84d45929493f1248a9b8ccfeba6032beb54acd
Ticket: 1157137fffffffffffffffffffffffffffffffff
Cannot open file if parent directory unreadable on Solaris
User & Date: vincentdarley on 2005-04-13 18:54:35
Changes

  1. icomment:
    Logged In: YES 
    user_id=32170
    
    I'm not really sure how to resolve this.  The first point to
    make is that Tcl must check cwd() because if the getcwd()
    has changed (possible in C programs using the Tcl API) then
    the file reference is different. Also this is required to
    deal with the whole virtual-filesystem stuff. Now there are
    some changes that could perhaps be made to help with this,
    so all is hopefully not lost.
    
    However, Tcl's test suite actually tests for the case where:
    
    cd foo
    exec chmod foo .... (remove permissions)
    pwd
    ->throws error that there are no permissions.
    
    So, Tcl wants to throw an error in this case. 
    
    The only solution I can think of is that, if Tcl_FSGetCwd()
    returns NULL _and_ the error is a lack of permissions _and_
    we're just accessing Tcl_FSGetCwd() in order to normalize a
    path _then_ we use the cached value that was passed to 'cd'
    instead.
    
    This might allow this situation to work ok on Solaris but
    not break anything else.
    
    any thoughts?
    
    
    
  2. login: "vincentdarley"
  3. mimetype: "text/plain"
  4. username: "vincentdarley"