I have an issue when copy a lot of files (images, pdf, etc) from one directory to another one. In a destination folder all these files is corrupted. I tried to use both noProcess and processContentExclude options but it brought no results.
My copy task config looks like this:
copy: {
assets_images: {
options: {
noProcess: ['**/*.{png,gif,jpg,ico,pdf}']
},
expand: true,
cwd: 'static/images/',
src: '**',
dest: 'dist/assets/images/'
},
assets_data: {
options: {
noProcess: ['**/*.{png,gif,jpg,ico,pdf}']
},
expand: true,
cwd: 'static/data/',
src: '**',
dest: 'dist/assets/data/'
}
}
Could you please help me with this?
UPDATE:
I did some investigations and found out that binary code of the png files in the source and destionation folders are differ.
I suspect that copy task process files using wrong encoding (by default it is utf8). As I understand it process them as a binary files and utf8 is not a correct encoding in this case.
What would you recomend to do for fix this issue?