Changeset 1708 for trunk/base


Ignore:
Timestamp:
Jan 18, 2003, 10:22:42 PM (17 years ago)
Author:
jpm
Message:

don't recursively copy directories.

this was only a problem when installing directories that contained
directories. while the base directory would be registered in the contents
list, the inner directory would not...

File:
1 edited

Legend:

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

    r1701 r1708  
    7272
    7373proc install_element {src_element dst_element} {
    74     file copy -force $src_element $dst_element
    75     set attributes [file attributes $src_element]       
    76     for {set i 0} {$i < [llength $attributes]} {incr i} {
    77         set opt [lindex $attributes $i]
    78         incr i
    79         set arg [lindex $attributes $i]
    80         file attributes $dst_element $opt $arg
    81     }
     74        # don't recursively copy directories
     75        if {[file isdirectory $src_element]} {
     76                file mkdir $dst_element
     77        } else {
     78                file copy -force $src_element $dst_element
     79        }
     80
     81        set attributes [file attributes $src_element]   
     82        for {set i 0} {$i < [llength $attributes]} {incr i} {
     83                set opt [lindex $attributes $i]
     84                incr i
     85                set arg [lindex $attributes $i]
     86                file attributes $dst_element $opt $arg
     87        }
    8288}
    8389
Note: See TracChangeset for help on using the changeset viewer.