summaryrefslogtreecommitdiff
path: root/src/index.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-08-12 11:05:09 +0300
committerTimo Teras <timo.teras@iki.fi>2009-08-12 11:05:09 +0300
commitdee6ffa492c2efee982dcd0b4724213317eceb37 (patch)
treeadd143a84e1679384f0101e86cc712d387387a89 /src/index.c
parentbd9835a20ee6b191c844ebba0433e5d321c976f4 (diff)
downloadapk-tools-dee6ffa492c2efee982dcd0b4724213317eceb37.tar.gz
apk-tools-dee6ffa492c2efee982dcd0b4724213317eceb37.tar.bz2
apk-tools-dee6ffa492c2efee982dcd0b4724213317eceb37.tar.xz
apk-tools-dee6ffa492c2efee982dcd0b4724213317eceb37.zip
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.
Diffstat (limited to 'src/index.c')
-rw-r--r--src/index.c2
1 files changed, 1 insertions, 1 deletions
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) {