diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/subst.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/subst.c b/util/subst.c index 66d7d9a9..c0eda5cf 100644 --- a/util/subst.c +++ b/util/subst.c @@ -434,16 +434,20 @@ int main(int argc, char **argv) printf("Using original atime\n"); set_utimes(outfn, fileno(old), tv); } +#ifndef _WIN64 if (ofd >= 0) (void) fchmod(ofd, 0444); +#endif fclose(out); if (unlink(newfn) < 0) perror("unlink"); } else { if (verbose) printf("Creating or replacing %s.\n", outfn); +#ifndef _WIN64 if (ofd >= 0) (void) fchmod(ofd, 0444); +#endif fclose(out); if (old) fclose(old); |