summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2007-09-16 15:41:53 +0000
committerFrederic Culot <calcurse@culot.org>2007-09-16 15:41:53 +0000
commit5e62e11e237b0048f225b9caff1729ce91cd0100 (patch)
tree4fdc225f587c5e9fb65e7b4fadf3e870861fbaca
parentb69a59b34ee88a62fa71368c2df2061e410553e0 (diff)
downloadcalcurse-5e62e11e237b0048f225b9caff1729ce91cd0100.zip
export to /tmp/calcurse.ics is now performed in case /home/pepe is not set
-rwxr-xr-xsrc/io.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/io.c b/src/io.c
index 1a61b9c..0fd542a 100755
--- a/src/io.c
+++ b/src/io.c
@@ -1,4 +1,4 @@
-/* $calcurse: io.c,v 1.21 2007/08/15 15:36:27 culot Exp $ */
+/* $calcurse: io.c,v 1.22 2007/09/16 15:41:53 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -128,10 +128,10 @@ io_get_export_stream(void)
stream = NULL;
stream_name = (char *)malloc(BUFSIZ);
- home = getenv("HOME");
- if (home == NULL)
- home = ".";
- snprintf(stream_name, BUFSIZ, "%s/calcurse.ics", home);
+ if ((home = getenv("HOME")) != NULL)
+ snprintf(stream_name, BUFSIZ, "%s/calcurse.ics", home);
+ else
+ snprintf(stream_name, BUFSIZ, "/tmp/calcurse.ics");
while (stream == NULL) {
status_mesg(question, "");