diff options
Diffstat (limited to 'qdepends.c')
-rw-r--r-- | qdepends.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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/qdepends.c,v 1.51 2011/02/21 01:33:47 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/portage-utils/qdepends.c,v 1.52 2011/03/17 03:01:19 vapier Exp $ * * Copyright 2005-2010 Ned Ludd - <solar@gentoo.org> * Copyright 2005-2010 Mike Frysinger - <vapier@gentoo.org> @@ -30,7 +30,7 @@ static const char * const qdepends_opts_help[] = { "Show all DEPEND info", COMMON_OPTS_HELP }; -static const char qdepends_rcsid[] = "$Id: qdepends.c,v 1.51 2011/02/21 01:33:47 vapier Exp $"; +static const char qdepends_rcsid[] = "$Id: qdepends.c,v 1.52 2011/03/17 03:01:19 vapier Exp $"; #define qdepends_usage(ret) usage(ret, QDEPENDS_FLAGS, qdepends_long_opts, qdepends_opts_help, lookup_applet_idx("qdepends")) static char qdep_name_only = 0; @@ -355,8 +355,8 @@ int qdepends_main_vdb(const char *depend_file, int argc, char **argv) dep_node *dep_tree; struct stat st; - xchdir(portroot); - xchdir(portvdb); + snprintf(buf, sizeof(buf), "%s/%s", portroot, portvdb); + xchdir(buf); if ((dir = opendir(".")) == NULL) return EXIT_FAILURE; @@ -466,8 +466,8 @@ int qdepends_vdb_deep(const char *depend_file, const char *query) char depend[16384], use[8192]; dep_node *dep_tree; - xchdir(portroot); - xchdir(portvdb); + snprintf(buf, sizeof(buf), "%s/%s", portroot, portvdb); + xchdir(buf); if ((dir = opendir(".")) == NULL) return EXIT_FAILURE; |