Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Report lstat() errors.
jlaffaye committed 14 years ago
commit 94bb1b4cd04eac8a2b302d33a779fa8193fd09dc
parent ed78e25
1 file changed +5 -1
modified libpkg/packing.c
@@ -85,7 +85,11 @@ packing_append_file(struct packing *pack, const char *filepath, const char *newp
	archive_entry_clear(pack->entry);
	archive_entry_copy_sourcepath(pack->entry, filepath);

-
	lstat(filepath, &st);
+
	if (lstat(filepath, &st) != 0) {
+
		EMIT_ERRNO("lstat", filepath);
+
		retcode = EPKG_FATAL;
+
		goto cleanup;
+
	}
	retcode = archive_read_disk_entry_from_file(pack->aread, pack->entry, -1,
												&st);
	if (retcode != ARCHIVE_OK) {