Hi, ` On Sun, Apr 20, 2025 at 07:47:49AM +0000, NRK wrote: > On Sun, Apr 20, 2025 at 09:22:10AM +0200, g...@suckless.org wrote: > > + if (!confirm("overwrite '%s'? ", s2)) { > > + cp_status = 1; > > I missed it when reviewing the fist time, but this, I'm pretty sure is > not correct. According to POSIX: > > > https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/utilities/cp.html#tag_20_24 > The following exit values shall be returned: > 0 All requested files (excluding files where a > non-affirmative response was given to a request for > confirmation) were successfully copied. > >0 An error occurred. > > And so !confirm() must not count as an "error" return code. The earlier > version of the patch didn't modify `cp_status` which was the right > behavior.
Good catch, I missed that too. As you discover the issue, do you want to create the patch to get authorship? Related to cp -i, we don't have rm -i, so we can extend the usage of confirm to rm easily now. Regards,