673 |
ctx->modified = 1; |
ctx->modified = 1; |
674 |
|
|
675 |
/* XXX: find a better way. without it, winpt --keymanager loads |
/* XXX: find a better way. without it, winpt --keymanager loads |
676 |
the key cache twice otherwise. */ |
the key cache twice. */ |
677 |
if (ctx->last_access.dwLowDateTime == 0) |
if (ctx->last_access.dwLowDateTime == 0) |
678 |
ctx->modified = 0; |
ctx->modified = 0; |
679 |
|
|
680 |
ctx->last_access.dwLowDateTime = ctx->access.dwLowDateTime; |
ctx->last_access.dwLowDateTime = ctx->access.dwLowDateTime; |
681 |
ctx->last_access.dwHighDateTime = ctx->access.dwHighDateTime; |
ctx->last_access.dwHighDateTime = ctx->access.dwHighDateTime; |
682 |
} |
} |
1082 |
} |
} |
1083 |
|
|
1084 |
|
|
1085 |
|
/* Make backups of all keyrings. The public key ring is |
1086 |
|
rotated like this pubring-%d.gpg. */ |
1087 |
void |
void |
1088 |
gnupg_backup_keyrings (void) |
gnupg_backup_keyrings (void) |
1089 |
{ |
{ |
1094 |
if (!reg_prefs.auto_backup) |
if (!reg_prefs.auto_backup) |
1095 |
return; |
return; |
1096 |
bakmode = reg_prefs.backup.mode; |
bakmode = reg_prefs.backup.mode; |
1097 |
srcpath = get_gnupg_path (); |
srcpath = get_gnupg_path (); |
1098 |
check_keyring (&srcpath); |
check_keyring (&srcpath); |
1099 |
if (bakmode == 1) { |
if (bakmode == 1) { |
1100 |
dstpath = get_gnupg_path (); |
dstpath = multi_gnupg_path (1); |
1101 |
check_keyring (&dstpath); |
check_keyring (&dstpath); |
1102 |
} |
} |
1103 |
else if (bakmode == 2) { |
else if (bakmode == 2) { |
1104 |
char * tmpfile; |
char *tmpfile; |
1105 |
FILE * fp; |
FILE *fp; |
1106 |
|
|
1107 |
dstpath = m_strdup (reg_prefs.backup.path); |
dstpath = m_strdup (reg_prefs.backup.path); |
1108 |
if (!dstpath) |
if (!dstpath) |
1133 |
free_if_alloc (name); |
free_if_alloc (name); |
1134 |
free_if_alloc (srcpath); |
free_if_alloc (srcpath); |
1135 |
free_if_alloc (dstpath); |
free_if_alloc (dstpath); |
1136 |
} /* gnupg_backup_keyrings */ |
} |
1137 |
|
|
1138 |
|
|
1139 |
/* Display GPG error from file if possible. */ |
/* Display GPG error from file if possible. */ |