-
-
Notifications
You must be signed in to change notification settings - Fork 731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CopyFiles doesn't respect source directory structure #899
Comments
@thomaslevesque Hi, this is by design, but we have discussed it before so think we should add an overload with something like bool preserveFolderStructure or similar. |
That would be awesome! In the meantime, I'll find a workaround |
Superb, if it's a good workaround you should submit a 😉 |
Here's my (ugly) workaround:
|
Hello thomaslevesque. |
Something like this:
|
I tested this workaround method with the following but it wont work same output as CopyFiles(pattern
|
@robgha01, it's just a quick and dirty workaround, I haven't tested it thoroughly... it works well enough for my needs, but I can't guarantee anything beyond that. |
I could totally be missing something here, but is what you want actually CopyDirectory instead of Copy files? I ran into a similar thing where I tried to use CopyFiles to copy a directory and ended up using CopyDirectory, which worked for me. |
From what I can see in the documentation, it's absolutely possible that I should be using |
Actually... maybe not. I use globbing to specify which files to copy, and |
Hi there, i want to ask if this issue is still present. I have created some overloads where you can select to keep the folder structure for Task("A")
.Does(() =>
{
CopyFiles("root/**/*.js", "target", true);
});
RunTarget("A") Should i create a pull request to show? |
What You Are Seeing?
If I have a directory structure like this:
When I execute this:
The files are copied to a flat directory structure, instead of preserving the original structure:
What is Expected?
The same structure as in the source folder
What version of Cake are you using?
0.11
Are you running on a 32 or 64 bit system?
64 bit
What environment are you running on? Windows? Linux? Mac?
Windows 8.1
Are you running on a CI Server? If so, which one?
Not at this point, just testing locally (but eventually it will run on Jenkins)
How Did You Get This To Happen? (Steps to Reproduce)
As described above
Output Log
I realize this may be the intended behavior, but I don't think it makes much sense... especially since there doesn't seem to be an easy way to manually list and copy the files.
The text was updated successfully, but these errors were encountered: