[79864] trunk/base/src/registry2.0/portimage.tcl

jmr at macports.org jmr at macports.org
Tue Jun 28 12:30:53 PDT 2011


Revision: 79864
          http://trac.macports.org/changeset/79864
Author:   jmr at macports.org
Date:     2011-06-28 12:30:51 -0700 (Tue, 28 Jun 2011)
Log Message:
-----------
fix moving broken symlinks when force activating (#29952)

Modified Paths:
--------------
    trunk/base/src/registry2.0/portimage.tcl

Modified: trunk/base/src/registry2.0/portimage.tcl
===================================================================
--- trunk/base/src/registry2.0/portimage.tcl	2011-06-28 19:24:21 UTC (rev 79863)
+++ trunk/base/src/registry2.0/portimage.tcl	2011-06-28 19:30:51 UTC (rev 79864)
@@ -463,7 +463,7 @@
                         # if we're forcing the activation, then we move any existing
                         # files to a backup file, both in the filesystem and in the
                         # registry
-                        if { [file exists $file] } {
+                        if { ![catch {file type $file}] } {
                             set bakfile "${file}${baksuffix}"
                             ui_warn "File $file already exists.  Moving to: $bakfile."
                             file rename -force -- $file $bakfile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110628/1777e815/attachment.html>


More information about the macports-changes mailing list