You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2014/01/01 23:23:47 UTC

[Bug 54397] Copy task fails when copying from CIFS mounted location

https://issues.apache.org/bugzilla/show_bug.cgi?id=54397

--- Comment #3 from Stefan Bodewig <bo...@apache.org> ---
This is ugly.

Ant uses FileChannel#transferFrom as this is supposed to be more efficient than
the traditional shuffling of buffers between streams/channels.  It looks as if
the implementation inside the Java classlib doesn't work for certain kinds of
files.

Unfortunately I don't see how Ant could detect the situation as we cannot query
the FileChannel whether it would support transfers and the exception is an
unspecific IOException.

One option may be to add a flag that disables transferFrom altogether - which
will require changes in lots of places - I'm pondering a global system property
to avoid adding a new parameter and adding it to lots of tasks.

There may be a workaround for you as Ant will not use transferFrom if a
filterset or a filterchain exists.  You could add a filterChain that didn't
modify anything but this would very likely break binary files when copying them
(so is only an option if we are talking about text files).

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