From 22d91c257916ee775a9116f9a1bae88001af9ad2 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 17 Mar 2011 03:01:19 +0000 Subject: combine the portroot/portvdb chdirs to avoid leading slash issues in portvdb itself --- qcheck.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'qcheck.c') diff --git a/qcheck.c b/qcheck.c index cd7eb1e7..49fc8558 100644 --- a/qcheck.c +++ b/qcheck.c @@ -1,7 +1,7 @@ /* * Copyright 2005-2010 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/portage-utils/qcheck.c,v 1.46 2011/02/21 01:33:47 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/portage-utils/qcheck.c,v 1.47 2011/03/17 03:01:19 vapier Exp $ * * Copyright 2005-2010 Ned Ludd - * Copyright 2005-2010 Mike Frysinger - @@ -32,7 +32,7 @@ static const char * const qcheck_opts_help[] = { "Ignore differing file mtimes", COMMON_OPTS_HELP }; -static const char qcheck_rcsid[] = "$Id: qcheck.c,v 1.46 2011/02/21 01:33:47 vapier Exp $"; +static const char qcheck_rcsid[] = "$Id: qcheck.c,v 1.47 2011/03/17 03:01:19 vapier Exp $"; #define qcheck_usage(ret) usage(ret, QCHECK_FLAGS, qcheck_long_opts, qcheck_opts_help, lookup_applet_idx("qcheck")) short bad_only = 0; @@ -100,8 +100,8 @@ int qcheck_main(int argc, char **argv) if ((argc == optind) && !search_all) qcheck_usage(EXIT_FAILURE); - xchdir(portroot); - xchdir(portvdb); + snprintf(buf, sizeof(buf), "%s/%s", portroot, portvdb); + xchdir(buf); if ((dir = opendir(".")) == NULL) errp("unable to read '.' !?"); -- cgit v1.2.3-65-gdbad