# HG changeset patch # User Patrick Mezard # Date 2008-11-26 21:27:37 # Node ID f21e3d0e335b2ebbb37a7c344e889335360de5b2 # Parent 4c4324476be6315b0e8622b62fed68720aacd855 util_win32: fix Windows version checking (issue1358) shell.SHGetPathFromIDList() segfaults when called in Apache. diff --git a/mercurial/util_win32.py b/mercurial/util_win32.py --- a/mercurial/util_win32.py +++ b/mercurial/util_win32.py @@ -245,7 +245,7 @@ def system_rcpath_win32(): def user_rcpath_win32(): '''return os-specific hgrc search path to the user dir''' userdir = os.path.expanduser('~') - if sys.getwindowsversion() != 2 and userdir == '~': + if sys.getwindowsversion()[3] != 2 and userdir == '~': # We are on win < nt: fetch the APPDATA directory location and use # the parent directory as the user home dir. appdir = shell.SHGetPathFromIDList(