]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
When the P flag is set (i.e. Overwrite regular files before deleting them),
authorguido <guido@FreeBSD.org>
Mon, 10 Nov 2003 09:40:18 +0000 (09:40 +0000)
committerguido <guido@FreeBSD.org>
Mon, 10 Nov 2003 09:40:18 +0000 (09:40 +0000)
commit9e1c15152d8b38156ce6e1d4a2fbd3e11a56674b
tree53c464dc84cd72052fd171d617613082dfda0f94
parent380c6f2932599fad3793a1ddb91a028c22f5b5d0
When the P flag is set (i.e. Overwrite regular files before deleting them),
do only unlink the file if we could indeed overwrite the file.
Old behaviour: rm -P /tmp/foo (foo mode 0444) would NOT overwrite foo,
but still delete it (with a warning: rm: foo: Permission denied)
New behaviour: Just the EPERM warning, but no deletion

Reviewed by: bde
bin/rm/rm.c