| … | … | @@ -74,18 +74,17 @@ void find_history_filepath(const char *dictname, const char *argv0, |
| 74 | 74 | dictpref[strcspn(dictpref, ":")] = '\0'; |
| 75 | 75 | |
| 76 | 76 | // Find the location of the history file. |
| 77 | | const char *hfile = xdg_make_path(XDG_BD_STATE, "%s/%s%s", xdg_prog, |
| 78 | | dictpref, history_file_basename); |
| 77 | history_file = xdg_make_path(XDG_BD_STATE, "%s/%s%s", xdg_prog, |
| 78 | dictpref, history_file_basename); |
| 79 | 79 | free(dictpref); |
| 80 | 80 | |
| 81 | | if (NULL == hfile) |
| 81 | if (NULL == history_file) |
| 82 | 82 | { |
| 83 | 83 | prt_error("Warning: xdg_get_home(XDG_BD_STATE) failed; " |
| 84 | 84 | "input history will not be supported.\n"); |
| 85 | 85 | history_file = strdup("dev/null"); |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | | history_file = hfile; |
| 89 | 88 | if (get_verbosity() == D_USER_FILES) |
| 90 | 89 | prt_error("Debug: Using history file \"%s\"\n", history_file); |
| 91 | 90 | } |