From dee6ffa492c2efee982dcd0b4724213317eceb37 Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Wed, 12 Aug 2009 11:05:09 +0300 Subject: io: better error handling when writing stuff out also have the output stream support writing to temporary file and do renameat/unlinkat on close depending on if all writes succeeded or not. --- src/index.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/index.c') diff --git a/src/index.c b/src/index.c index fbf1bcb..d485afd 100644 --- a/src/index.c +++ b/src/index.c @@ -169,7 +169,7 @@ static int index_main(void *ctx, struct apk_database *db, int argc, char **argv) } if (ictx->output != NULL) - os = apk_ostream_to_file(AT_FDCWD, ictx->output, 0644); + os = apk_ostream_to_file(AT_FDCWD, ictx->output, NULL, 0644); else os = apk_ostream_to_fd(STDOUT_FILENO); if (ictx->method == APK_SIGN_GENERATE) { -- cgit v1.2.3-60-g2f50