summaryrefslogtreecommitdiff
path: root/ar.c
diff options
context:
space:
mode:
Diffstat (limited to 'ar.c')
-rw-r--r--ar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ar.c b/ar.c
index b758a69..eaa15a5 100644
--- a/ar.c
+++ b/ar.c
@@ -298,7 +298,8 @@ extern int ar_main(int argc, char **argv)
while(extractList->next != NULL) {
if ( (funct & EXT_TO_FILE) == EXT_TO_FILE) {
- dstFd = open(extractList->name, O_WRONLY | O_CREAT);
+ dstFd = open(extractList->name, O_WRONLY | O_CREAT, extractList->mode);
+
extractAr(srcFd, dstFd, extractList);
}
if ( (funct & EXT_TO_STDOUT) == EXT_TO_STDOUT)