[22012] trunk/base/src/port1.0/portutil.tcl
source_changes at macosforge.org
source_changes at macosforge.org
Wed Feb 14 01:59:53 PST 2007
Revision: 22012
http://trac.macosforge.org/projects/macports/changeset/22012
Author: eridius at macports.org
Date: 2007-02-14 01:59:52 -0800 (Wed, 14 Feb 2007)
Log Message:
-----------
Fix a dangerous situation with the delete command where it would follow symlinks to directories
Modified Paths:
--------------
trunk/base/src/port1.0/portutil.tcl
Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl 2007-02-14 07:31:47 UTC (rev 22011)
+++ trunk/base/src/port1.0/portutil.tcl 2007-02-14 09:59:52 UTC (rev 22012)
@@ -519,7 +519,7 @@
set stack [list $arg]
while {[llength $stack] > 0} {
set file [lindex $stack 0]
- if {[file isdirectory $file]} {
+ if {![string equal [file type $file] link] && [file isdirectory $file]} {
# it's a directory
set children [glob -nocomplain -directory $file * .*]
set children [ldelete [ldelete $children $file/.] $file/..]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070214/df107c0c/attachment.html
More information about the macports-changes
mailing list