Changeset 134502 for trunk/base


Ignore:
Timestamp:
Mar 27, 2015, 7:42:01 PM (5 years ago)
Author:
cal@…
Message:

base: when all you have is a regex, everything looks like a regular problem

(but that doesn't mean it is, or it is a good idea to use regex)
Follow-up to r134501, see #47283

File:
1 edited

Legend:

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

    r127845 r134502  
    268268    # also save the contents for our own use later
    269269    set installPlist {}
     270    set destpathLen [string length $destpath]
    270271    fs-traverse -depth fullpath $destpath {
    271272        if {[file type $fullpath] eq "directory"} {
    272273            continue
    273274        }
    274         set relpath [strsed $fullpath "s|^$destpath/||"]
    275         if {![regexp {^[+]} $relpath]} {
     275
     276        set relpath [string range $fullpath $destpathLen+1 end]
     277        if {[string index $relpath 0] ne "+"} {
    276278            puts $fd "$relpath"
    277279            lappend installPlist [file join [file separator] $relpath]
Note: See TracChangeset for help on using the changeset viewer.