]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - play.c
Replace get_homedir() by get_confdir().
[paraslash.git] / play.c
diff --git a/play.c b/play.c
index efac36a1a9c9c1096edbec27ac429df397364941..cc87286518469c53e8c2c3d006a842e3772e12f4 100644 (file)
--- a/play.c
+++ b/play.c
@@ -1044,16 +1044,14 @@ static void session_open(void)
        if (OPT_GIVEN(HISTORY_FILE))
                history_file = para_strdup(OPT_STRING_VAL(HISTORY_FILE));
        else {
-               const char *home = get_homedir();
-               char *dot_para = make_message("%s/.paraslash", home);
+               const char *confdir = get_confdir();
 
-               ret = para_mkdir(dot_para);
+               ret = para_mkdir(confdir);
                /* warn, but otherwise ignore mkdir error */
                if (ret < 0)
-                       PARA_WARNING_LOG("Can not create %s: %s\n", dot_para,
+                       PARA_WARNING_LOG("Can not create %s: %s\n", confdir,
                                para_strerror(-ret));
-               history_file = make_message("%s/play.history", dot_para);
-               free(dot_para);
+               history_file = make_message("%s/play.history", confdir);
        }
        ici.history_file = history_file;
        ici.loglevel = loglevel;