GitHub user jaikiran opened a pull request:
https://github.com/apache/ant/pull/37
[1.9.x branch] BZ-60644 Fix file corruption during copy task
The commit here includes a fix for the issue reported in
https://bz.apache.org/bugzilla/show_bug.cgi?id=60644. As described in that
issue, the copy task corrupts the source file(s) that's being copied in cases
where the target file points back to the source file through symlink.
The commit here (intentionally) handles/fixes this issue in core/central
location and not just in the Copy task so that all such copy operations
(through the `ResourceUtils`) now have the safeguard to ensure that such
copying doesn't cause the source file corruption and the copying itself is
skipped if the source and destination are the same resource.
This commit also includes a testcase to verify and fix the issue.
This PR is against the 1.9.x branch. Once tested, approved and merged, I
can make corresponding PR/commits to the master branch to fix it there too.
P.S: Given that this change is in a central location (the `ResourceUtils`),
for obvious reasons, this PR will have to run past the complete set of tests
before being merged.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jaikiran/ant bz-60644
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ant/pull/37.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #37
----
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]