Skip to content

Commit f34b207

Browse files
committed
Fix --open-noatime option not working on files
atime of source files could sometimes be overwritten even though --open-noatime option was used.
1 parent 23d9ead commit f34b207

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

syscall.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,11 @@ int do_open_nofollow(const char *pathname, int flags)
683683
#endif
684684
}
685685

686+
#ifdef O_NOATIME
687+
if (open_noatime)
688+
flags |= O_NOATIME;
689+
#endif
690+
686691
#ifdef O_NOFOLLOW
687692
fd = open(pathname, flags|O_NOFOLLOW);
688693
#else

0 commit comments

Comments
 (0)