icetime: Output where the chipdb should be found.

Makes it easier to know where it can't be.
This commit is contained in:
Tim 'mithro' Ansell 2018-06-10 16:16:40 -07:00
parent f23b1f212a
commit b1d0af7edd
1 changed files with 3 additions and 1 deletions

View File

@ -343,12 +343,14 @@ void read_chipdb()
homedir += getenv("HOME");
#endif
snprintf(buffer, 1024, "%s%s/share/" CHIPDB_SUBDIR "/chipdb-%s.txt", homedir.c_str(), PREFIX+1, config_device.c_str());
} else
} else {
snprintf(buffer, 1024, PREFIX "/share/" CHIPDB_SUBDIR "/chipdb-%s.txt", config_device.c_str());
}
FILE *fdb = fopen(buffer, "r");
if (fdb == nullptr) {
perror("Can't open chipdb file");
fprintf(stderr, " %s\n", buffer);
exit(1);
}