Skip to content

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

Merged
asfgit merged 2 commits into
apache:masterfrom
kwin:bugfix/fix-check-for-last-modified-date
Jul 25, 2022
Merged

asfgit merged 2 commits into
apache:masterfrom
kwin:bugfix/fix-check-for-last-modified-date

Conversation

@kwin

@kwin kwin commented Jul 25, 2022

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

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

@kwin

kwin commented Jul 25, 2022

Copy link
Copy Markdown
Member Author

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
@slawekjaranowski slawekjaranowski added the bug Something isn't working label Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants