mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-17 17:18:45 +02: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