diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-07-10 19:04:49 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-07-10 19:04:49 +0200 |
commit | 160f12687e3eec7ebc12869504b614344370b771 (patch) | |
tree | 9871380257aab3de095d21ab8af27570c94e8eb1 /src/io.c | |
parent | 34caa4a426b3a3eabd08e9fe5c7bc088d2285393 (diff) | |
parent | 34f094312fc2e9dce7621449e07f25c748039f97 (diff) | |
download | calcurse-160f12687e3eec7ebc12869504b614344370b771.zip |
Merge branch 'maint'
Diffstat (limited to 'src/io.c')
-rw-r--r-- | src/io.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -220,7 +220,8 @@ get_export_stream (enum export_type type) (void)snprintf (stream_name, BUFSIZ, "%s/calcurse.%s", home, file_ext[type]); else - (void)snprintf (stream_name, BUFSIZ, "/tmp/calcurse.%s", file_ext[type]); + (void)snprintf (stream_name, BUFSIZ, "%s/calcurse.%s", get_tempdir (), + file_ext[type]); while (stream == NULL) { @@ -2854,10 +2855,11 @@ io_import_data (enum import_type type, struct conf *conf, char *stream_name) struct io_file * io_log_init (void) { - const char *logprefix = "/tmp/calcurse_log."; + char logprefix[BUFSIZ]; char *logname; struct io_file *log; + snprintf (logprefix, BUFSIZ, "%s/calcurse_log.", get_tempdir ()); logname = new_tempfile (logprefix, NOTESIZ); RETVAL_IF (logname == NULL, 0, _("Warning: could not create temporary log file, Aborting...")); |