X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=samtools.git;a=blobdiff_plain;f=razip.c;h=dff9347770f281fc90631dcc24fbe77f7fc5cc94;hp=2b49883aefc6d607e7a44fbc9a3906443f8b7cbd;hb=317f5e8dd22cc9e1e5e05fbcaeb3b9aca7447351;hpb=4a17fa7e1f91b2fe04ad334a63fc2b0d5e859d8a diff --git a/razip.c b/razip.c index 2b49883..dff9347 100644 --- a/razip.c +++ b/razip.c @@ -27,7 +27,7 @@ static int write_open(const char *fn, int is_forced) int fd = -1; char c; if (!is_forced) { - if ((fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 0644)) < 0 && errno == EEXIST) { + if ((fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 0666)) < 0 && errno == EEXIST) { printf("razip: %s already exists; do you wish to overwrite (y or n)? ", fn); scanf("%c", &c); if (c != 'Y' && c != 'y') { @@ -37,7 +37,7 @@ static int write_open(const char *fn, int is_forced) } } if (fd < 0) { - if ((fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC, 0644)) < 0) { + if ((fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) { fprintf(stderr, "razip: %s: Fail to write\n", fn); exit(1); }