Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Check for failures from file_to_buffer
Baptiste Daroussin committed 10 years ago
commit fc6956dd75039dfbdee2962d85cbd93db21dd902
parent bb61e81
1 file changed +2 -1
modified libpkg/pkg_add.c
@@ -117,7 +117,8 @@ attempt_to_merge(int rootfd, struct pkg_config_file *rcf, struct pkg *local,
	}

	pkg_debug(1, "Config file found %s", rcf->path);
-
	file_to_bufferat(rootfd, RELATIVE_PATH(rcf->path), &localconf, &sz);
+
	if (file_to_bufferat(rootfd, RELATIVE_PATH(rcf->path), &localconf, &sz) != EPKG_OK)
+
		return;

	pkg_debug(2, "size: %d vs %d", sz, strlen(lcf->content));