mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-03 19:12:42 +03:00
rm would prompt for non-dangling symlinks
(prompt): When not interactive, don't prompt for a symlink.
This commit is contained in:
@@ -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. */
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user