aboutsummaryrefslogtreecommitdiff
path: root/fastjar
diff options
context:
space:
mode:
authorRanjit Mathew <rmathew@hotmail.com>2002-11-22 03:20:24 +0000
committerTom Tromey <tromey@gcc.gnu.org>2002-11-22 03:20:24 +0000
commit7fe75c032469f6490ba30421f4d3cc482acd1932 (patch)
tree179957b4baea96950d926ea9bc6f1053652cec40 /fastjar
parent57de2c8fb8d17d000d38ff4ffdb0d0013deeb0a3 (diff)
jartool.c (extract_jar): Use "open" with O_BINARY instead of "creat" to create extracted files.
2002-11-21 Ranjit Mathew <rmathew@hotmail.com> * jartool.c (extract_jar): Use "open" with O_BINARY instead of "creat" to create extracted files. From-SVN: r59366
Diffstat (limited to 'fastjar')
-rw-r--r--fastjar/ChangeLog5
-rw-r--r--fastjar/jartool.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/fastjar/ChangeLog b/fastjar/ChangeLog
index 5adc87d3db6..db86fb37923 100644
--- a/fastjar/ChangeLog
+++ b/fastjar/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-21 Ranjit Mathew <rmathew@hotmail.com>
+
+ * jartool.c (extract_jar): Use "open" with O_BINARY instead of
+ "creat" to create extracted files.
+
2002-11-11 Tom Tromey <tromey@redhat.com>
* dostime.c (dos2unixtime): Mask for seconds is 0x1f. Correctly
diff --git a/fastjar/jartool.c b/fastjar/jartool.c
index cd2efcb109f..7cc06aaad5b 100644
--- a/fastjar/jartool.c
+++ b/fastjar/jartool.c
@@ -1455,7 +1455,8 @@ int extract_jar(int fd, char **files, int file_num){
}
if(f_fd != -1 && handle){
- f_fd = creat((const char *)filename, 00644);
+ f_fd = open((const char *)filename,
+ O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644);
if(f_fd < 0){
fprintf(stderr, "Error extracting JAR archive!\n");