- kf = make_message("%s/.paraslash/key.%s", home, user);
- if (!file_exists(kf)) {
+ struct stat statbuf;
+ const char *confdir = get_confdir();
+ kf = make_message("%s/key.%s", confdir, user);
+ if (stat(kf, &statbuf) != 0) { /* assume file does not exist */
+ const char *home = getenv("HOME");
+ assert(home); /* get_confdir() above succeeded */