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

[MSHARED-1107] Make copyFile succeed with source file having #105

Merged
merged 2 commits into from
Jul 25, 2022

Conversation

kwin
Copy link
Member

@kwin kwin commented Jul 25, 2022

lastModified() = 0

Also check for existence of destination file

@kwin kwin force-pushed the bugfix/fix-check-for-last-modified-date branch from 45d4695 to 03ceba0 Compare July 25, 2022 12:57
@michael-o
Copy link
Member

Is NIO2 prone to this error? If not, why not use the FileTime there?

@kwin
Copy link
Member Author

kwin commented Jul 25, 2022

NIO2 would throw a proper exception when checking last modified date on a non existing file, but that wouldn't help here either. So an existence check is necessary even when using NIO2 for modified date.

kwin and others added 2 commits July 25, 2022 15:33
…fied() = 0

Also check for existence of destination file before overwriting.

This closes apache#105
@michael-o michael-o force-pushed the bugfix/fix-check-for-last-modified-date branch from 03ceba0 to 5b78029 Compare July 25, 2022 13:40
@asfgit asfgit merged commit 5b78029 into apache:master Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants