diff options
-rw-r--r-- | ar.c | 3 | ||||
-rw-r--r-- | archival/ar.c | 3 |
2 files changed, 4 insertions, 2 deletions
@@ -298,7 +298,8 @@ extern int ar_main(int argc, char **argv) | |||
298 | 298 | ||
299 | while(extractList->next != NULL) { | 299 | while(extractList->next != NULL) { |
300 | if ( (funct & EXT_TO_FILE) == EXT_TO_FILE) { | 300 | if ( (funct & EXT_TO_FILE) == EXT_TO_FILE) { |
301 | dstFd = open(extractList->name, O_WRONLY | O_CREAT); | 301 | dstFd = open(extractList->name, O_WRONLY | O_CREAT, extractList->mode); |
302 | |||
302 | extractAr(srcFd, dstFd, extractList); | 303 | extractAr(srcFd, dstFd, extractList); |
303 | } | 304 | } |
304 | if ( (funct & EXT_TO_STDOUT) == EXT_TO_STDOUT) | 305 | if ( (funct & EXT_TO_STDOUT) == EXT_TO_STDOUT) |
diff --git a/archival/ar.c b/archival/ar.c index b758a6975..eaa15a516 100644 --- a/archival/ar.c +++ b/archival/ar.c | |||
@@ -298,7 +298,8 @@ extern int ar_main(int argc, char **argv) | |||
298 | 298 | ||
299 | while(extractList->next != NULL) { | 299 | while(extractList->next != NULL) { |
300 | if ( (funct & EXT_TO_FILE) == EXT_TO_FILE) { | 300 | if ( (funct & EXT_TO_FILE) == EXT_TO_FILE) { |
301 | dstFd = open(extractList->name, O_WRONLY | O_CREAT); | 301 | dstFd = open(extractList->name, O_WRONLY | O_CREAT, extractList->mode); |
302 | |||
302 | extractAr(srcFd, dstFd, extractList); | 303 | extractAr(srcFd, dstFd, extractList); |
303 | } | 304 | } |
304 | if ( (funct & EXT_TO_STDOUT) == EXT_TO_STDOUT) | 305 | if ( (funct & EXT_TO_STDOUT) == EXT_TO_STDOUT) |