-
Notifications
You must be signed in to change notification settings - Fork 330
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 --parents broken #165
Comments
Yes I tested quickly and can confirm --parents is broken. In original commit 8fdd58a where feature was added. cp --parents will copy folders 1/2/ into 4 and create copy of file named as 3, which is incorrect comparing to GNU coreutils behavior... Current master says |
http://lists.landley.net/pipermail/toybox-landley.net/2020-February/011470.html Send patch to list around week ago. (Rob did not reply so incase gmail spam filter got me again reposting here. ) |
add: test for -D fix: b/c/d/FILE not copying into a/ with -D option dirname() is not needed when handling FLAG(D) since filename under src or dest should not be changed. github.com//issues/165
Hmm, I see. I think if one adds SOURCE between leading and dirs, under DEST, one will understand this. I thought which would be nice to have in any case ,) as upsteam, I can imagine time is an issue and so I will throw it on my own todo heap, and chances are by the time I have made a patch for that, it's 2034 and half of California is no more. |
I'm sorry, I didn't understand that. Can you give me an example? (Keeping in mind that -D is theoretically just a synonym for --parents because I like longopts to have a corresponding short opt, so it's trying to do the same behavior as debian's cp --parents?) |
Hi. Ye, sorry I just haven't used that before, the -D thing, and when I read the cp --help, I understood it as create parents under DEST rather than under SOURCE. I mean listed in the arguments that is. So I was trying something like : cp file a/b/c/d/file , and thinking it would act as install -D (create leading directories under DEST). Sorry about that, I am using your install and am in need of rewriting a lot of internal scripts which use the gnu? install -t option. I think maybe that is why I got a bit confused by the cp -D help message :) so anyway, I had install -D in mind when I read cp -D help, and to me it would be more clear thus, if the word SOURCE was where I suggested. However, seeing your response, it seems I just was mixing up things and nevermind the noise :) |
If somebody actually needs install -t I can probably add it. Doesn't look like that big a deal? |
also... should this bug be closed? what's left to do here after e76aeac? it says "minimal fix" but doesn't explain what (if anything) is still to be fixed... |
Commit 3d5cb06 |
Original issue is fixed. It says "minimal fix" because I originally send messy complicated patch to list and Rob hinted me perhaps there is better way. So e76aeac is more refined version. |
ah, thanks for the explanation! |
I tried this option and I found that it didn't behave like I think it should. It also doesn't have a test case for it.
I expected the file 'blah' to be created at the end of 3, but it's actually the last directory portion which is created as the file '3'.
The text was updated successfully, but these errors were encountered: