From c7415fa6c416cac8a377ea0762ddc81fce31de21 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 21 Dec 2008 09:00:55 +0100 Subject: [PATCH] xbps-pkgdb: use write_plist_file() one more time. --HG-- extra : convert_revision : 2fb3b77d82f780da943ef0505a09326c428009c7 --- utils/xbps-pkgdb.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/utils/xbps-pkgdb.c b/utils/xbps-pkgdb.c index 5cecb047f17..415a504ec97 100644 --- a/utils/xbps-pkgdb.c +++ b/utils/xbps-pkgdb.c @@ -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();