From 86b6db9f5a431691fd93e24d5d07cb5f7a4351de Mon Sep 17 00:00:00 2001 From: Paulo Antonio Alvarez Date: Tue, 22 Dec 2020 15:15:51 -0300 Subject: libext2fs: code adaptation to use the Windows IO manager Signed-off-by: Theodore Ts'o --- util/subst.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'util') 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); -- cgit v1.2.1