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

Harmless copy.c bug: Fail if no files match #209

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

eduardocasino
Copy link
Contributor

This was making copy.com to end silently when using wildcards if no files matched. Pretty harmless, but a bug is a bug 😉

@davidgiven
Copy link
Owner

Thanks --- merging. I actually think the copy logic for wildcards is pretty broken, but I'm not sure what the right behaviour should be so don't know how to fix it. What should 'copy foo.txt *.txt b:' do? Try to copy the same file twice? Error out? Deduplicate?

@davidgiven davidgiven merged commit 8998fae into davidgiven:master Jan 8, 2025
1 check passed
@eduardocasino
Copy link
Contributor Author

For that particular case, I think that copy the same file twice and deduplicate are equally valid. The first is not efficient in terms of disk io, but it simplifies the logic. The later would be ideal, but then you have to transverse the stash for every new match. I would never error out.

@eduardocasino eduardocasino deleted the copy-fix branch January 8, 2025 14:17
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