Copy task empties files (sets file length to 0)

This simple gradle script:

  task copy(type: Copy) {
    from 'dirA'
    from 'dirB'
    into 'dirA'

clear all the files in dirA directory.
When the source and destination are same, that the tash should not do any operation.

I have a zip file with my project, but I cannot upload attachements :-(.