cp: copy attributes after making subdir#6884
Conversation
898a027 to
6676cde
Compare
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
| fn build_dir( | ||
| path: &PathBuf, | ||
| recursive: bool, | ||
| options: &Options, |
There was a problem hiding this comment.
This is the usual convention, no?
The "primary" argument is first, all options and etc come afterwards.
There was a problem hiding this comment.
maybe but if you do, it should be in a sep commit :)
There was a problem hiding this comment.
Ok, done. I've reorganized commits & force-pushed.
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
82de5b9 to
62c33d4
Compare
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
80ef881 to
c8f7fdc
Compare
|
This pr should be ready to be merged. |
|
Sorry, i looked if skip_last wasn't implemented elsewhere and got distracted |
| // (Note that there can be more than one! We might step out of | ||
| // `./a/b/c` into `./a/`, in which case we'll need to fix the | ||
| // permissions of both `./a/b/c` and `./a/b`, in that order.) | ||
| if direntry.file_type().is_dir() { |
There was a problem hiding this comment.
would it make sense to move this into a function?
it is starting to be a bit long
There was a problem hiding this comment.
hm, I don't think so? That code is tightly integrated with the rest of copy_directory, and most of the lines are comments.
|
GNU testsuite comparison: |
|
Hm, > touch c d
> cargo run -- cp -b --update=none c d
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.16s
Running `/uutils/coreutils/target/debug/coreutils cp -b --update=none c d`
> cp -b --update=none c d
cp: --backup is mutually exclusive with -n or --update=none-fail
Try 'cp --help' for more information.This manual check fails on |
|
yes, cp-i fails https://uutils.github.io/coreutils/docs/test_coverage.html |
|
Huh, I think it's only reason this PR hasn't been passing tests? |
|
Looks like it worked! |
|
about cp-i.sh #7082 |
Closes #6875.
TODO:
test_dir_perm_race_with_preserve_mode_and_ownership.