summaryrefslogtreecommitdiffstats
path: root/libopkg
diff options
context:
space:
mode:
Diffstat (limited to 'libopkg')
-rw-r--r--libopkg/pkg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopkg/pkg.c b/libopkg/pkg.c
index 5d705c7..f73cf5c 100644
--- a/libopkg/pkg.c
+++ b/libopkg/pkg.c
@@ -334,7 +334,7 @@ pkg_init_from_file(pkg_t *pkg, const char *filename)
goto err0;
}
- control_file = fdopen(fd, "rw");
+ control_file = fdopen(fd, "rw+");
if (control_file == NULL) {
perror_msg("%s: fdopen", __FUNCTION__, control_path);
close(fd);