Skip to content
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

Fixes acquiring timestamp from a file with long path name on Windows #271

Merged
merged 2 commits into from
Sep 19, 2019
Merged

Fixes acquiring timestamp from a file with long path name on Windows #271

merged 2 commits into from
Sep 19, 2019

Conversation

eatkins
Copy link
Contributor

@eatkins eatkins commented Sep 19, 2019

Should fix sbt/sbt#5098.

@eatkins eatkins requested a review from cunei September 19, 2019 18:53
@eatkins eatkins changed the title Windows lm Fix IO.getModifiedTimeOrZero on Windows Sep 19, 2019
In jdk >= 11, java returns millisecond precision timestamps if the file
system supports it. It's better to avoid the jna if we can.
It is necessary to prefix the file name passed into CreateFile with
"\\?\" to allow file names with more than max_path (260) characters on
windows:
https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea..

Fixes sbt/sbt#5098.
Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eatkins eatkins merged commit 2b7100e into sbt:develop Sep 19, 2019
@eatkins eatkins deleted the windows-lm branch September 19, 2019 20:15
@eed3si9n eed3si9n changed the title Fix IO.getModifiedTimeOrZero on Windows Fixes acquiring timestamp from a file with long path name on Windows Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[1.3.0] sources are recompiled every time when jars are cached in the long path in Windows
2 participants