Subject: Re: rm patch
To: Liam J. Foy <>
From: Bernd Ernesti <>
List: tech-userlevel
Date: 08/23/2006 07:19:53
On Wed, Aug 23, 2006 at 01:19:53AM +0100, Liam J. Foy wrote:
> >That was the example before your patch, how would the example
> >look like after someone applied it?

Could you please give me some answers for this

> >I'm currious about the behaviour if you said yes to overwrite it
> >and then 'rm' would try to remove it after that. Would it ask again
> >to remove it because of the missing write permission and what
> >would happen if you denie that then?


> >Or would the -P unconditionally overwrite the file without
> >asking for the permission and then the override message comes
> >from the remove stage?

and this question?

> I have also added another check from FreeBSD in check() for a more
> graceful return (instead of Permission Denied).
> The patch will basically make sure that the requested file is  
> overwritten
> before it will remove it, since you obviously want to overwrite it  
> first.
> If it can't overwrite it won't remove it. If it can overwrite it will  
> remove it.

Please see my questions above.

> The question is whether -f should cause the removal regardless of the
> overwrite result (I personally think yes).

You mean without even trying to overwrite it?
Or regardless of the overwritte success?

IMHO it should try to overwrite it and even if that fails it should try to
remove it.