* Start by making sure the sessions subdir exists. Ignore the * error return from mkdir since it's perfectly likely to be * `already exists', and any other error will trip us up later * on so there's no real need to catch it now.
* Start by making sure the .putty directory and its sessions * subdir actually exist. Ignore error returns from mkdir since * they're perfectly likely to be `already exists', and any * other error will trip us up later on so there's no real need * to catch it now.
void *open_settings_w(const char *sessionname){    char filename[FILENAME_MAX];    FILE *fp;    /*     * Start by making sure the sessions subdir exists. Ignore the     * error return from mkdir since it's perfectly likely to be     * `already exists', and any other error will trip us up later     * on so there's no real need to catch it now.     */    make_filename(filename, INDEX_SESSIONDIR, sessionname);    mkdir(filename, 0700);    make_filename(filename, INDEX_SESSION, sessionname);    fp = fopen(filename, "w");    if (!fp)	return NULL;		       /* can't open */    return fp;}