Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Remove file if fetch failed.
jlaffaye committed 15 years ago
commit a1793580d9bb6b9a2c5532f2c4544f02c91382ee
parent b938ebe
2 files changed +4 -7
modified docs/TODO
@@ -1,8 +1,3 @@
-
ALPHA
-
- pkg_add (libpkg): refactor to return the struct pkg. use this pkg to display
-
  pkg-message in the client, and to update the status of the dependencies in
-
  libpkg without hitting the database.
-

BETA1
- repo
- install from repo
@@ -13,5 +8,3 @@ BETA1

BETA2
- doc
-

-

modified libpkg/fetch.c
@@ -78,5 +78,9 @@ pkg_fetch_file(const char *url, const char *dest, void *data, fetch_cb cb)
	if (remote != NULL)
		fclose(remote);

+
	/* Remove local file if fetch failed */
+
	if (retcode != EPKG_OK)
+
		unlink(dest);
+

	return (retcode);
}