-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix last modified timestamps not getting preserved #4171
base: release/4.0
Are you sure you want to change the base?
Conversation
build test apk |
The requested APKs has been built. Please find them from the artifacts section of this PR. |
if (getFile().setLastModified(date)) return true; | ||
|
||
try { | ||
Files.setLastModifiedTime(getFile().toPath(), FileTime.fromMillis(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.
What if it runs on Android < 8? Perhaps you may need to trap Exceptions like NoSuchMethodException as well.
(Although I too expect minimal Android version requirement would need to be raised soon as well)
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.
trapping NoSuchMethodException
gives a compiler error. did version checking to avoid this issue.
Description
Issue tracker
fixes #892
Automatic tests
Manual tests
Done
tested on A14 (cut, copy) * (file, directory).
Build tasks success
Successfully running following tasks on local:
./gradlew assembledebug
./gradlew spotlessCheck