From 6b096c9651da0d032a0e611d5edee7256e0da3c1 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 13 May 2009 17:35:54 +0200 Subject: [PATCH] /etc/profile: use $HOMEDRIVE\$HOMEPATH as default HOME Heiko Voigt changed msys-1.0.dll to leave HOMEDRIVE and HOMEPATH alone, so we should actually use it, too. While at it, use this default not only if the variable HOME is unset, but also if it does not point to a directory. This should finally take care of msysGit issue 108. Signed-off-by: Johannes Schindelin --- etc/profile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/profile b/etc/profile index e588d706..8310d5a3 100644 --- a/etc/profile +++ b/etc/profile @@ -28,8 +28,8 @@ else fi # Set up USER's home directory -if [ -z "$HOME" ]; then - HOME="$USERPROFILE" +if [ -z "$HOME" -o ! -d "$HOME" ]; then + HOME="$HOMEDRIVE$HOMEPATH" fi if [ ! -d "$HOME" ]; then -- 2.11.4.GIT