ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 49261] Copy task fails to overwrite readonly files even with overwrite="true"
Date Fri, 07 May 2010 09:14:31 GMT

Stefan Bodewig <> changed:

           What    |Removed                     |Added
         OS/Version|                            |All

--- Comment #1 from Stefan Bodewig <> 2010-05-07 05:14:26 EDT ---
My guess is that our changed copy code using NIO is taking the target's
permissions into account whlie the old stream based approach did not.

overwrite really only says "write even if the dest isn't out of date" and never
had any influence on whether a readonly dest file would get overwritten.
If you create dest befaore source in your testcase Ant 1.7.1 will happily
overwrite dest without the overwrite attribute as well.

I must admit that I actually like the change - Ant shouldn't ignore the
read-only state if the destination.  We may want to throw in an additional
attribute that controls the behavior.

If my guess is correct then you can trick Ant into using the non-NIO code
by filtering- i.e. you could throw in a filter that doesn't change your
files.  This will not work for binary files.  Another "trick" would be to
ZIP or TAR up the sources and extract from there since the NIO code
is only used if source and dest are files and no filtering occurs at all.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message