From 2752261687c7fb40bb794f94f75764e68e345f66 Mon Sep 17 00:00:00 2001 From: "Fletcher T. Penney" Date: Fri, 21 Jul 2017 11:15:38 -0400 Subject: [PATCH] TESTING: Working on Travis --- Sources/multimarkdown/main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Sources/multimarkdown/main.c b/Sources/multimarkdown/main.c index e606a37..bed78e5 100644 --- a/Sources/multimarkdown/main.c +++ b/Sources/multimarkdown/main.c @@ -476,29 +476,30 @@ int main(int argc, char** argv) { char * folder = NULL; - if (a_file->count == 1) { - folder = dirname((char *) a_file->filename[0]); - } - if ((extensions & EXT_TRANSCLUDE) && (a_file->count == 1)) { // Perform transclusion(s) // Convert to absolute path for first file to enable proper path resolution - #ifdef PATH_MAX char absolute[PATH_MAX + 1]; realpath(a_file->filename[0], absolute); fprintf(stderr, "A->'%s'->'%s'\n",a_file->filename[0],absolute); + folder = dirname((char *) a_file->filename[0]); mmd_transclude_source(buffer, folder, absolute, format, NULL, NULL); #else char * absolute = realpath(a_file->filename[0], NULL); fprintf(stderr, "B->'%s'->'%s'\n",a_file->filename[0],absolute); + folder = dirname((char *) a_file->filename[0]); mmd_transclude_source(buffer, folder, absolute, format, NULL, NULL); free(absolute); #endif // Don't free folder -- owned by dirname } + if (a_file->count == 1) { + folder = dirname((char *) a_file->filename[0]); + } + // Perform block level CriticMarkup? if (extensions & EXT_CRITIC_ACCEPT) { mmd_critic_markup_accept(buffer); -- 2.40.0