From: Fletcher T. Penney Date: Fri, 21 Jul 2017 15:15:38 +0000 (-0400) Subject: TESTING: Working on Travis X-Git-Tag: 6.2.0^2~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2752261687c7fb40bb794f94f75764e68e345f66;p=multimarkdown TESTING: Working on Travis --- 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);