Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 839a96b102f7d0390fc664e96b2f9e2683a84f29
Ticket: 591647ffffffffffffffffffffffffffffffffff
file copy patch to copy files not links
User & Date: hemanglavana on 2002-08-08 16:53:38
Changes

  1. icomment:
    Logged In: YES 
    user_id=81875
    
    Here's a corner case which results in error when <srcfile>
    is a softlink and file copy is invoked from another
    directory:
    
    godel:43> ls -lR
    .:
    total 16
    drwxr-xr-x   2 hlavana  eng          141 Aug  8 05:47 test
    
    ./test:
    total 16
    lrwxrwxrwx   1 hlavana  eng            3 Aug  8 05:47 bar -> foo
    -rw-r--r--   1 hlavana  eng            0 Aug  8 05:46 foo
    godel:44> /tmp/hlavana/tcltk/bin/tclsh8.4 
    % file copy test/bar xxx
    error copying "test/bar" to "xxx": no such file or directory
    % cd test
    % file copy bar ../xxx
    % exit
    godel:45> ls -l
    total 16
    drwxr-xr-x   2 hlavana  eng          141 Aug  8 05:47 test
    -rw-r--r--   1 hlavana  eng            0 Aug  8 05:46 xxx
    godel:46> 
    
    Thus, softlinks pointing to relative paths need to converted
    into absolute paths first before invoking the real file copy.
    
    
  2. login: "hemanglavana"
  3. mimetype: "text/plain"
  4. username: "hemanglavana"