Re: [dev] [sbase] [PATCH v2] rm: Fix exit status with -f for nonexistent paths

From: Michael Forney <mforney_AT_mforney.org>
Date: Sun, 1 Mar 2015 14:44:12 -0800

On Sun, Mar 01, 2015 at 11:23:28PM +0100, FRIGN wrote:
> I'd do it like this instead, makes it clearer that we're
> dealing with one special case:
>
> if (remove(path) < 0) {
> if (!rm_fflag)
> weprintf("remove %s:", path);
> rm_status = !(rm_fflag && errno == ENOENT);
> }
>
> What do you think?

That looks good to me.
Received on Sun Mar 01 2015 - 23:44:12 CET

This archive was generated by hypermail 2.3.0 : Sun Mar 01 2015 - 23:48:07 CET