Changeset 1737 for trunk/base


Ignore:
Timestamp:
Jan 19, 2003, 10:24:03 AM (17 years ago)
Author:
landonf (Landon Fuller)
Message:

Do not try to set owner/group/etc attributes on a symlink

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portinstall.tcl

    r1730 r1737  
    6363
    6464proc install_element {src_element dst_element} {
    65         # don't recursively copy directories
    66         if {[file isdirectory $src_element]} {
    67                 file mkdir $dst_element
    68         } else {
    69                 file copy -force $src_element $dst_element
    70         }
     65# don't recursively copy directories
     66    if {[file isdirectory $src_element]} {
     67        file mkdir $dst_element
     68    } else {
     69        file copy -force $src_element $dst_element
     70    }
    7171
     72    # if the file is a symlink, do not try to set file attributes
     73    if {[file type $src_element] != "link"} {
    7274        set attributes [file attributes $src_element]   
    7375        for {set i 0} {$i < [llength $attributes]} {incr i} {
    74                 set opt [lindex $attributes $i]
    75                 incr i
    76                 set arg [lindex $attributes $i]
    77                 file attributes $dst_element $opt $arg
     76            set opt [lindex $attributes $i]
     77            incr i
     78            set arg [lindex $attributes $i]
     79            file attributes $dst_element $opt $arg
    7880        }
     81    }
    7982}
    8083
Note: See TracChangeset for help on using the changeset viewer.