From 0c4e9d3f0073092df30213bb9eb4296ec9176b19 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 28 Jul 2011 12:45:29 +0200 Subject: Invoke vars_init() before importing data with "-i" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We forgot to call vars_init() when importing an item using the "-i" command line argument, which led to the pager configuration variable being unset and hence the pager invocation (triggered to show the log in case there are any errors during import) failing. Fix this by calling vars_init() before io_import_data(). Reported-by: Andraž 'ruskie' Levstik Signed-off-by: Lukas Fleischer --- src/args.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/args.c b/src/args.c index cfa25cc..652736a 100644 --- a/src/args.c +++ b/src/args.c @@ -880,6 +880,8 @@ parse_args (int argc, char **argv, struct conf *conf) { io_check_file (path_apts, (int *)0); io_check_file (path_todo, (int *)0); + /* Get default pager in case we need to show a log file. */ + vars_init (conf); io_load_app (); io_load_todo (); io_import_data (IO_IMPORT_ICAL, conf, ifile); -- cgit v1.2.3-70-g09d2 From 8681af3c6d43ab7aa48dc49cd12058e9ba3d488e Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 28 Jul 2011 13:03:24 +0200 Subject: io.c: Accept resource parameters in iCal import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove colons from the "SUMMARY:" and "DURATION:" search patterns in ical_read_event() to allow for additional parameters (such as language parameters, cf. RFC 5545). Reported-by: Andraž 'ruskie' Levstik Signed-off-by: Lukas Fleischer --- src/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/io.c b/src/io.c index 74a8089..de46cce 100644 --- a/src/io.c +++ b/src/io.c @@ -2427,10 +2427,10 @@ ical_read_event (FILE *fdi, FILE *log, unsigned *noevents, unsigned *noapoints, { const int ITEMLINE = *lineno; const struct string endevent = STRING_BUILD ("END:VEVENT"); - const struct string summary = STRING_BUILD ("SUMMARY:"); + const struct string summary = STRING_BUILD ("SUMMARY"); const struct string dtstart = STRING_BUILD ("DTSTART"); const struct string dtend = STRING_BUILD ("DTEND"); - const struct string duration = STRING_BUILD ("DURATION:"); + const struct string duration = STRING_BUILD ("DURATION"); const struct string rrule = STRING_BUILD ("RRULE"); const struct string exdate = STRING_BUILD ("EXDATE"); const struct string alarm = STRING_BUILD ("BEGIN:VALARM"); -- cgit v1.2.3-70-g09d2