Skip to content
Snippets Groups Projects
Commit f21e3d0e authored by Patrick Mezard's avatar Patrick Mezard
Browse files

util_win32: fix Windows version checking (issue1358)

shell.SHGetPathFromIDList() segfaults when called in Apache.
parent 4c432447
No related branches found
No related tags found
No related merge requests found
......@@ -245,7 +245,7 @@
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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment