-
Notifications
You must be signed in to change notification settings - Fork 740
Closed
Labels
bash compatCompatibility issues with bash or POSIX behaviorCompatibility issues with bash or POSIX behaviorfixBug/defect, or a fix for such a problemBug/defect, or a fix for such a problem
Description
Node version (or tell us if you're using electron or some other framework):
v10.19.0
ShellJS version (the most recent version/Github branch you see the bug on):
tip-of-tree master branch
Operating system:
Ubuntu 20.04
Description of the bug:
It looks like cp('sourceFile', 'destFile')
updates the atime
(access time) attribute of the source file. Unix cp
doesn't seem to update the atime.
I noticed this while working on #869.
Example ShellJS command to reproduce the error:
shell.touch({ '-d': new Date(newModifyTimeMs), '-m': true }, srcFile);
shell.cp(srcFile, `${t.context.tmp}/dest`);
const stat = common.statFollowLinks(srcFile);
t.is(stat.mtime.getTime(), newModifyTimeMs); // mtime seems OK
t.is(stat.atime.getTime(), newAccessTimeMs); // this one fails
Metadata
Metadata
Assignees
Labels
bash compatCompatibility issues with bash or POSIX behaviorCompatibility issues with bash or POSIX behaviorfixBug/defect, or a fix for such a problemBug/defect, or a fix for such a problem