]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - client.c
Merge topic branch t/sf_float into pu
[paraslash.git] / client.c
index d2d11fd34344d5b4f5186daf568850fe153cbacb..661aff8fc2d9e90e0ac2b86f47d95957b69bdfa3 100644 (file)
--- a/client.c
+++ b/client.c
@@ -525,15 +525,9 @@ __noreturn static void interactive_session(void)
        };
 
        PARA_NOTICE_LOG("\n%s\n", version_text("client"));
        };
 
        PARA_NOTICE_LOG("\n%s\n", version_text("client"));
-       if (CLIENT_OPT_GIVEN(HISTORY_FILE, ct->lpr))
-               ici.history_file = para_strdup(CLIENT_OPT_STRING_VAL(
-                       HISTORY_FILE, ct->lpr));
-       else {
-               char *home = para_homedir();
-               ici.history_file = make_message("%s/.paraslash/client.history",
-                       home);
-               free(home);
-       }
+       ici.history_file = CLIENT_OPT_GIVEN(HISTORY_FILE, ct->lpr)?
+               para_strdup(CLIENT_OPT_STRING_VAL(HISTORY_FILE, ct->lpr)) :
+               make_message("%s/client.history", get_confdir());
        act.sa_handler = i9e_signal_dispatch;
        sigemptyset(&act.sa_mask);
        act.sa_flags = 0;
        act.sa_handler = i9e_signal_dispatch;
        sigemptyset(&act.sa_mask);
        act.sa_flags = 0;
@@ -681,5 +675,6 @@ out:
        client_close(ct);
        btr_remove_node(&sit.btrn);
        btr_remove_node(&sot.btrn);
        client_close(ct);
        btr_remove_node(&sit.btrn);
        btr_remove_node(&sot.btrn);
+       free(get_confdir());
        return ret < 0? EXIT_FAILURE : EXIT_SUCCESS;
 }
        return ret < 0? EXIT_FAILURE : EXIT_SUCCESS;
 }