summaryrefslogtreecommitdiff
path: root/src/remove.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/remove.c')
-rw-r--r--src/remove.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/remove.c b/src/remove.c
index fbe720456..97184eb26 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -798,10 +798,14 @@ prompt (int fd_cwd, Dirstack_state const *ds, char const *filename,
*is_empty = T_UNKNOWN;
- if (((!x->ignore_missing_files & (x->interactive | x->stdin_tty))
+ if (x->interactive == RMI_NEVER)
+ return RM_OK;
+
+ if (((!x->ignore_missing_files & ((x->interactive == RMI_ALWAYS)
+ | x->stdin_tty))
&& (write_protected = write_protected_non_symlink (fd_cwd, filename,
ds, sbuf)))
- || x->interactive)
+ || x->interactive == RMI_ALWAYS)
{
if (cache_fstatat (fd_cwd, filename, sbuf, AT_SYMLINK_NOFOLLOW) != 0)
{
@@ -821,7 +825,7 @@ prompt (int fd_cwd, Dirstack_state const *ds, char const *filename,
/* Using permissions doesn't make sense for symlinks. */
if (S_ISLNK (sbuf->st_mode))
{
- if ( ! x->interactive)
+ if (x->interactive != RMI_ALWAYS)
return RM_OK;
write_protected = false;
}