Fix `win-randseed-location': use SHGetFolderPath() to find the
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 9 Jan 2007 18:05:17 +0000 (18:05 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 9 Jan 2007 18:05:17 +0000 (18:05 +0000)
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@7082 cda61777-01e9-0310-a592-d414129be87e


No differences found