From 93537f810293faa6727a8593428418dda6cf3950 Mon Sep 17 00:00:00 2001 From: Michael Mikonos <127171689+mknos@users.noreply.github.com> Date: Tue, 7 Jan 2025 12:26:14 +0800 Subject: [PATCH] rm: simplify process_options() * is_recursive() is already smart enough to check both -R and -r, so manually setting opt{"R"} is not required * As a regression test I removed some subdirs, first using -r, then -R --- bin/rm | 2 -- 1 file changed, 2 deletions(-) diff --git a/bin/rm b/bin/rm index 3954afde..6db83272 100755 --- a/bin/rm +++ b/bin/rm @@ -196,8 +196,6 @@ sub process_options { ); usage() unless $ret; - $opts{'R'} = 1 if $opts{'r'}; - $self->{options} = { map { defined $_ ? $_ : 0 } %opts }; $self->{files} = $self->{args};