From ee1abd5ada9b670791f7dd2d306bdbf9228fa439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 24 Mar 2019 23:24:15 +0100 Subject: Add VIRTUAL vcomponents. VIRTUAL vcomponents are vcomponents created without a source. Their primiary purpose is for creating brand new events, which will later be dumped to the proper files. They can however also be used in testing for great effect. --- src/calendar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/calendar.c') diff --git a/src/calendar.c b/src/calendar.c index be681abe..403ae83c 100644 --- a/src/calendar.c +++ b/src/calendar.c @@ -39,7 +39,7 @@ int handle_file(vcomponent* cal, char* path) { INFO("Parsing a single file"); vcomponent_push_val(cal, "NAME", path); - vcomponent_push_val(cal, "TYPE", "file"); + vcomponent_push_val(cal, "X-HNH-SOURCETYPE", "file"); char* resolved_path = realpath(path, NULL); open_ics (resolved_path, cal); free (resolved_path); @@ -66,7 +66,7 @@ int handle_dir(vcomponent* cal, char* path) { * TODO cut path to its last component. */ vcomponent_push_val(cal, "NAME", path); - vcomponent_push_val(cal, "TYPE", "vdir"); + vcomponent_push_val(cal, "X-HNH-SOURCETYPE", "vdir"); struct dirent* d; while ((d = readdir(dir)) != NULL) { -- cgit v1.2.3