Ticket #25268: normalize-filepath.diff

File normalize-filepath.diff, 1.2 KB (added by jmroot (Joshua Root), 14 years ago)
  • src/registry2.0/portimage.tcl

     
    705705            # match and activate will say that some file exists but doesn't
    706706            # belong to any port.
    707707            set theFile [file normalize $file]
    708             lappend files $theFile
    709 
    710             # Split out the filename's subpaths and add them to the image list as
    711             # well. The realpath call is necessary because file normalize
     708            # The realpath call is necessary because file normalize
    712709            # does not resolve symlinks on OS X < 10.6
    713710            set directory [realpath [file dirname $theFile]]
    714             while { [lsearch -exact $files $directory] == -1 } {
     711            lappend files [file join $directory [file tail $theFile]]
     712
     713            # Split out the filename's subpaths and add them to the image list
     714            # as well.
     715            while { [lsearch -exact $files $directory] == -1 } {
    715716                lappend files $directory
    716717                set directory [file dirname $directory]
    717718            }