Skip to content
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/mv/ln: add support for the "will not overwrite just-created" #5699

Merged
merged 9 commits into from
Dec 25, 2023

Conversation

sylvestre
Copy link
Sponsor Contributor

Should fix: tests/mv/childproof.sh

Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/mv/childproof is no longer failing!
Skipping an intermittent issue tests/tail/inotify-dir-recreate

@@ -1171,6 +1171,9 @@ pub fn copy(sources: &[PathBuf], target: &Path, options: &Options) -> CopyResult
//
// key is the source file's information and the value is the destination filepath.
let mut copied_files: HashMap<FileInformation, PathBuf> = HashMap::with_capacity(sources.len());
// remember the copied destinations for further usage.
// we can't use copied_files as it is because the key is the source file's information.
let mut copied_destinations: HashSet<PathBuf> = HashSet::with_capacity(sources.len());
Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will open a good first bug after to avoid "duplication" here

@sylvestre
Copy link
Sponsor Contributor Author

i have another PR pending based on this one to fix
tests/cp/fail-perm.sh

@cakebaker
Copy link
Contributor

Fails on Windows :|

@cakebaker
Copy link
Contributor

test_ln_seen_file fails on Android :|

src/uu/cp/src/cp.rs Outdated Show resolved Hide resolved
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/mv/childproof is no longer failing!

tests/by-util/test_ln.rs Outdated Show resolved Hide resolved
src/uu/ln/src/ln.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@cakebaker cakebaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except of the Android issue it looks good. Great job!

sylvestre and others added 2 commits December 25, 2023 11:17
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/ls/block-size is no longer failing!
Congrats! The gnu test tests/mv/childproof is no longer failing!
Skip an intermittent issue tests/tail/inotify-dir-recreate

@cakebaker cakebaker merged commit f10c6f1 into uutils:main Dec 25, 2023
56 of 57 checks passed
@sylvestre sylvestre deleted the mv-cp-seen branch December 25, 2023 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants