]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Fix `win-randseed-location': use SHGetFolderPath() to find the
authorSimon Tatham <anakin@pobox.com>
Tue, 9 Jan 2007 18:05:17 +0000 (18:05 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 9 Jan 2007 18:05:17 +0000 (18:05 +0000)
commitdbbd6eb5ecdad5eb0b010e9ad4997fac53356189
treee78731cf270d7dc09a8e87e1e6278c654cfecb70
parent6c3f4b3baa3d795c615ad212d700ba213010211e
Fix `win-randseed-location': use SHGetFolderPath() to find the
Application Data directory in preference to the old-fashioned
attempt to find the user's home directory, and use the _local-
machine_ Application Data directory in preference even to that.

SHGetFolderPath() is called via GetProcAddress, so this degrades
gracefully on old Windowses. (Tested myself on Win95.)

As part of this change, we now search for a location for the seed
file separately for reading and writing, so that installing the new
PuTTY should cause a seamless migration as the old seed file is read
from the old location and then a new one written to the new location.

`putty -cleanup' attempts to delete the seed file from _all_
affected locations.

Naturally, a user-specified seed file path in the Registry still
takes priority over all other means of finding the location.

[originally from svn r7082]
windows/winstore.c