mirror of
https://https.git.savannah.gnu.org/git/coreutils.git
synced 2026-01-27 01:44:21 +00:00
rm would prompt for non-dangling symlinks
(prompt): When not interactive, don't prompt for a symlink.
This commit is contained in:
parent
fc1b595b19
commit
db6dff2e6e
@ -574,7 +574,11 @@ prompt (char const *filename, struct rm_options const *x,
|
||||
|
||||
/* Using permissions doesn't make sense for symlinks. */
|
||||
if (S_ISLNK (sbuf.st_mode))
|
||||
write_protected = 0;
|
||||
{
|
||||
if ( ! x->interactive)
|
||||
return RM_OK;
|
||||
write_protected = 0;
|
||||
}
|
||||
|
||||
/* Issue the prompt. */
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user