Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
chdir(2) to portsdir before attempting to run make(1) -- this avoids problems if the current working directory has been deleted out from underneath us.
Matthew Seaman committed 12 years ago
commit b1bf0ea0b539cd065d314ab56ff26aaa2370aca6
parent 6dbb17b
1 file changed +4 -0
modified src/version.c
@@ -593,6 +593,10 @@ do_source_ports(unsigned int opt, char limchar, char *pattern, match_t match,
		return (EX_USAGE);
	}

+

+
	if (chdir(portsdir) != 0)
+
		err(EX_SOFTWARE, "Cannot chdir to %s\n", portsdir); 
+

	if (pkgdb_open(&db, PKGDB_DEFAULT) != EPKG_OK)
		return (EX_IOERR);