mirror of
https://github.com/SciresM/hactool
synced 2024-11-10 06:34:14 +00:00
Discourage bad usage patterns with a warn.
This commit is contained in:
parent
37e368b87b
commit
0d0435f0b7
1 changed files with 7 additions and 2 deletions
9
main.c
9
main.c
|
@ -384,8 +384,13 @@ int main(int argc, char **argv) {
|
|||
if (keypath.valid == VALIDITY_VALID) {
|
||||
keyfile = os_fopen(keypath.os_path, OS_MODE_READ);
|
||||
}
|
||||
if (keyfile == NULL) {
|
||||
keyfile = open_key_file((tool_ctx.action & ACTION_DEV) ? "dev" : "prod");
|
||||
FILE *homekeyfile = open_key_file((tool_ctx.action & ACTION_DEV) ? "dev" : "prod");
|
||||
if (homekeyfile == NULL) {
|
||||
printf("[WARN] prod.keys/dev.keys does not exist.\n");
|
||||
} else if (keyfile == NULL) {
|
||||
keyfile = homekeyfile;
|
||||
} else {
|
||||
fclose(homekeyfile);
|
||||
}
|
||||
|
||||
if (keyfile != NULL) {
|
||||
|
|
Loading…
Reference in a new issue