-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(files): update mtime on attributes tampering #602
Conversation
8b1ce0e
to
4f27fcb
Compare
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
4f27fcb
to
fffd8d8
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #602 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 216 224 +8
Branches 62 62
=========================================
+ Hits 216 224 +8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
d8ba76a
to
fffd8d8
Compare
file.attributes.test = true | ||
|
||
// Check that mtime has been updated | ||
expect(file.mtime?.getDate()).toBe(new Date().getDate()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test will fail occasionally if the previous statement runs a microsecond earlier than the next invocation of new Date
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No because I'm comparing the date, so it would have to be exactly 1ms before midnight 😁
When we change an attribute or rename/move a file, the
mtime
should be edited automaticallymtime
crtime