Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
file_exists() function loaded into sqlite -- takes two arguments.
Matthew Seaman committed 13 years ago
commit 3443f044c92671bd9e9bad4f1d1212b273438725
parent 7e68d85
1 file changed +6 -6
modified libpkg/pkg_repo.c
@@ -242,13 +242,13 @@ pkg_repo_fetch(struct pkg *pkg)
static void
file_exists(sqlite3_context *ctx, int argc, __unused sqlite3_value **argv)
{
-
	char fpath[MAXPATHLEN];
-
	sqlite3 *db = sqlite3_context_db_handle(ctx);
-
	char *path = dirname(sqlite3_db_filename(db, "main"));
-
	char cksum[SHA256_DIGEST_LENGTH * 2 +1];
+
	char	 fpath[MAXPATHLEN];
+
	sqlite3	*db = sqlite3_context_db_handle(ctx);
+
	char	*path = dirname(sqlite3_db_filename(db, "main"));
+
	char	cksum[SHA256_DIGEST_LENGTH * 2 +1];

-
	if (argc != 1) {
-
		sqlite3_result_error(ctx, "Need one argument", -1);
+
	if (argc != 2) {
+
		sqlite3_result_error(ctx, "Need two arguments", -1);
		return;
	}