grunt-copy-to icon indicating copy to clipboard operation
grunt-copy-to copied to clipboard

Error when processContent options return false

Open quentinsup opened this issue 6 years ago • 0 comments

Hello, I've tried to use processContent function to filter files depending on the last modification time value, and return false when i do not wan't the file to be copied.

But an error occured : Warning ENOENT: no such file or directory, utime ''.

I think the problem is from the copy_to.js file, at lien 52 :

grunt.file.copy(fullpath, dest, copyOptions);
fs.utimesSync(dest, stats.mtime, stats.mtime);
filesCopied++;

You should replace by :

if(grunt.file.copy(fullpath, dest, copyOptions)) {
    fs.utimesSync(dest, stats.mtime, stats.mtime);
    filesCopied++;
}

Note : code at line 43 should be the same.

quentinsup avatar Jun 26 '18 12:06 quentinsup