[47050] trunk/base/src/port1.0/portutil.tcl
blb at macports.org
blb at macports.org
Fri Feb 20 17:22:30 PST 2009
Revision: 47050
http://trac.macports.org/changeset/47050
Author: blb at macports.org
Date: 2009-02-20 17:22:29 -0800 (Fri, 20 Feb 2009)
Log Message:
-----------
port1.0/portutil.tcl - use lchown to change ownership since Tcl's
'file attribute' will follow symlinks (since it uses chown()) and this will
fail in the case where it's a relative symlink; ticket #18573 and
http://lists.macosforge.org/pipermail/macports-users/2009-February/013860.html
Modified Paths:
--------------
trunk/base/src/port1.0/portutil.tcl
Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl 2009-02-21 01:12:52 UTC (rev 47049)
+++ trunk/base/src/port1.0/portutil.tcl 2009-02-21 01:22:29 UTC (rev 47050)
@@ -2352,11 +2352,11 @@
# @param path the file/directory to be chowned
# @param user the user to chown file to
proc chown {path user} {
- file attributes $path -owner [name_to_uid "$user"]
+ lchown $path $user
if {[file isdirectory $path]} {
fs-traverse myfile ${path} {
- file attributes $myfile -owner [name_to_uid "$user"]
+ lchown $myfile $user
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090220/053f55d8/attachment.html>
More information about the macports-changes
mailing list