-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
cp: modify archive flag to copy dir contents rather than dir #3954
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
cp: modify archive flag to copy dir contents rather than dir #3954
Conversation
I guess you saw that it failed on some other archs:
|
Thanks for the quick feedback. I just noticed, however I also ran the same command That being said, I dont have the knowledge so far to know how to make it work for windows(given the lack of Thanks again |
maybe it could be a unix test only ? |
73c66fc
to
24da098
Compare
Yeah, nice solution. Done :) |
294ea51
to
a8839e7
Compare
Is there anything I shall do to get that final test passing? It looks like its unrelated to this PR. I am just making sure I have addressed the issues. Let me know :) and thanks again for your time and guidance! |
No need to worry about that test. The android build is failing on all PRs at the moment. There are some conflicts that need to be resolved though. |
That failed test is actually not because of the spurious failures from before, it's because we still need to decide how to fix #3477. |
@dmatos2012 sorry but it needs to be rebased |
cd74bb8
to
fe4da2b
Compare
uff I had completely forgotten about this PR :P @sylvestre , but managed to rebase :) |
GNU testsuite comparison:
|
@@ -93,7 +93,7 @@ impl<'a> Context<'a> { | |||
fn new(root: &'a Path, target: &'a Path) -> std::io::Result<Self> { | |||
let current_dir = env::current_dir()?; | |||
let root_path = current_dir.join(root); | |||
let root_parent = if target.exists() { | |||
let root_parent = if target.exists() && !root.to_str().unwrap().ends_with("/.") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the only edge case in which the files are copied?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought so from the original issue, but was so long ago I dont remember if there was something else present at the time 😛
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah it is super long ago 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, looks good. Sorry it took so long!
Hello,
This PR fixes #3886 to handle copying source's directory contents rather than the directory itself.
Its my first ever Rust PR. Thanks for the helpful responses, and in case something else needs to be added, i can do so np.
Thanks:)