Fall back to / if the directory $USERPROFILE cannot be accessed
commitd2ebbc8f8513dc142d0598ee05480db7c7d2e1c2
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 13 Mar 2009 00:03:01 +0000 (13 01:03 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 27 Mar 2009 16:20:04 +0000 (27 17:20 +0100)
tree42fa7eae605fb5c13c85c2176739190840a491f0
parentd38999c7bebd6451afcb1e41ec4491f7537b47b8
Fall back to / if the directory $USERPROFILE cannot be accessed

If the user has non-ASCII characters in her name, the variable $HOME
(being set to $USERPROFILE) will disagree with the encoding of the
actual path as it is on-disk.

The reason is that the environment variables adher to the current locale
(e.g. CP1252), but the file system stores file names in UTF-16.

As long as MSys is not modified to handle this case as the user would
expect, we fall back to setting HOME=/ (which is better than nothing).

This works around msysGit issue 108.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
etc/profile