-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
cp/mv/ln: add support for the "will not overwrite just-created" #5699
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
Conversation
Should help with tests/mv/childproof.sh
Should help with tests/mv/childproof.sh
Should help with tests/mv/childproof.sh
GNU testsuite comparison:
|
@@ -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()); |
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 will open a good first bug after to avoid "duplication" here
i have another PR pending based on this one to fix |
Fails on Windows :| |
|
GNU testsuite comparison:
|
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.
Except of the Android issue it looks good. Great job!
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
GNU testsuite comparison:
|
Should fix: tests/mv/childproof.sh