summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libopkg/opkg_cmd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c
index 29ae0cd..4059bb7 100644
--- a/libopkg/opkg_cmd.c
+++ b/libopkg/opkg_cmd.c
@@ -182,6 +182,12 @@ opkg_update_cmd(int argc, char **argv)
else
opkg_msg(NOTICE, "Signature check failed.\n");
}
+ if (err) {
+ /* The signature was wrong so delete it */
+ opkg_msg(NOTICE, "Remove wrong Signature file.\n");
+ unlink (tmp_file_name);
+ unlink (list_file_name);
+ }
/* We shouldn't unlink the signature ! */
// unlink (tmp_file_name);
free (tmp_file_name);