[48100] trunk/base/src/port1.0/portutil.tcl

jmr at macports.org jmr at macports.org
Sat Mar 14 02:01:28 PDT 2009


Revision: 48100
          http://trac.macports.org/changeset/48100
Author:   jmr at macports.org
Date:     2009-03-14 02:01:27 -0700 (Sat, 14 Mar 2009)
Log Message:
-----------
Expand ~user when $HOME is not set, instead of guessing.

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-03-14 08:55:41 UTC (rev 48099)
+++ trunk/base/src/port1.0/portutil.tcl	2009-03-14 09:01:27 UTC (rev 48100)
@@ -1510,12 +1510,8 @@
 			# HOME environment var is set, use it.
 			set userhome "$env(HOME)"
 		} else {
-			# the environment var isn't set, make an educated guess
-			if {[option os.platform] == "darwin"} {
-			    set userhome "/Users/${username}"
-			} else {
-			    set userhome "/home/${username}"
-			}
+			# the environment var isn't set, expand ~user instead
+			set userhome [file normalize "~${username}"]
 		}
 		
 		# set alternative prefix global variables
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090314/027abf03/attachment.html>


More information about the macports-changes mailing list