gastonelhordoy/grunt-rpm — pull request #10 by jessetan (2014-05-07 07:35:54+00:00)
Title: Incorrect file locations with dynamic src-dest mapping (and globbing)

In some cases, files are not copied to the proper target directories.
Consider the following Gruntfile.js excerpt:

test1: {
files: [
{
src: "foo/bar/index.html",
dest: "monkey/"
}
]
},
test2: {
files: [
{
cwd: "foo/bar",
expand: true,
src: "index.html",
dest: "monkey/"
},
]
},

When using grunt-contrib-copy, the locations for index.html are: monkey/foo/bar/index.html for test1 and monkey/index.html for test2.
The expected locations using grunt-rpm are: rpm/tmp/monkey/foo/bar/index.html for test1 and rpm/tmp/monkey/index.html for test2. Instead, the location for test 2 is rpm/tmp/monkey/index.html/foo/bar/index.html.

I've used some code from grunt-contrib-copy to fix this, would be nice if you could merge this to master.