diff options
author | Paulo Antonio Alvarez <pauloaalvarez@gmail.com> | 2020-12-22 15:15:51 -0300 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2021-03-31 16:09:14 -0400 |
commit | 86b6db9f5a431691fd93e24d5d07cb5f7a4351de (patch) | |
tree | 3d3d70744f5dfc3d1d6218c025beaf363994cc80 /util | |
parent | d04f34a050e3334456e9ee80f95869dc47b0fd9f (diff) | |
download | e2fsprogs-86b6db9f5a431691fd93e24d5d07cb5f7a4351de.tar.gz |
libext2fs: code adaptation to use the Windows IO manager
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
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); |