mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 20:12:48 -05:00
Report an error if deleting a random seed file fails.
(This has also required me to add a currently unused nonfatal() to PuTTYgen, since although PuTTYgen won't actually try to delete putty.rnd, it does link in winstore.c as a whole.) [originally from svn r9957]
This commit is contained in:
@ -456,7 +456,10 @@ enum { DEL, OPEN_R, OPEN_W };
|
||||
static int try_random_seed(char const *path, int action, HANDLE *ret)
|
||||
{
|
||||
if (action == DEL) {
|
||||
remove(path);
|
||||
if (!DeleteFile(path) && GetLastError() != ERROR_FILE_NOT_FOUND) {
|
||||
nonfatal("Unable to delete '%s': %s", path,
|
||||
win_strerror(GetLastError()));
|
||||
}
|
||||
*ret = INVALID_HANDLE_VALUE;
|
||||
return FALSE; /* so we'll do the next ones too */
|
||||
}
|
||||
|
Reference in New Issue
Block a user