xbps-pkgdb: use write_plist_file() one more time.

--HG--
extra : convert_revision : 2fb3b77d82f780da943ef0505a09326c428009c7
This commit is contained in:
Juan RP 2008-12-21 09:00:55 +01:00
parent 592e9eca89
commit c7415fa6c4

View File

@ -89,7 +89,8 @@ write_plist_file(prop_dictionary_t dict, const char *file)
if (!prop_dictionary_externalize_to_file(dict, file)) {
prop_object_release(dict);
perror("=> ERROR: couldn't write to database file");
printf("=> ERROR: couldn't write to %s (%s)",
file, strerror(errno));
exit(1);
}
}
@ -260,11 +261,7 @@ main(int argc, char **argv)
argv[2]);
exit(1);
}
if (!prop_dictionary_externalize_to_file(dbdict, argv[2])) {
printf("=> ERROR: couldn't write new plist file "
"(%s)\n", strerror(errno));
exit(1);
}
write_plist_file(dbdict, argv[2]);
} else {
usage();