From 06810213a8099362fcfe7174feaa4d62a3fcddca Mon Sep 17 00:00:00 2001 From: erg Date: Thu, 6 May 2010 16:03:08 +0000 Subject: [PATCH] Fix gvconfig_libdir function to report resolved lib directory if -v set. Previously, this was set up to be done on the first call to this function, but at that time, argv[] hasn't been process, so job->common.verbose had not yet been set, and nothing is printed. --- lib/gvc/gvconfig.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c index ad4a45e08..ca5cf6ae1 100644 --- a/lib/gvc/gvconfig.c +++ b/lib/gvc/gvconfig.c @@ -267,6 +267,7 @@ char * gvconfig_libdir(GVC_t * gvc) { static char line[BSZ]; static char *libdir; + static boolean dirShown = 0; char *path, *tmp; FILE *f; @@ -323,9 +324,10 @@ char * gvconfig_libdir(GVC_t * gvc) } #endif } - if (gvc->common.verbose > 1) - fprintf (stderr, "libdir = \"%s\"\n", - (libdir ? libdir : "")); + } + if (gvc->common.verbose && !dirShown) { + fprintf (stderr, "libdir = \"%s\"\n", (libdir ? libdir : "")); + dirShown = 1; } return libdir; } -- 2.40.0