From 586ce31d0d016101ffac04b973778bc6c8872fc8 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Fri, 2 Sep 2022 23:05:44 -0600 Subject: [PATCH] Inverted logic for log level validationd --- sway/wallpaper.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/wallpaper.pl b/sway/wallpaper.pl index 39953fe..f1c2efd 100755 --- a/sway/wallpaper.pl +++ b/sway/wallpaper.pl @@ -433,7 +433,7 @@ while (my $arg = shift(@ARGV)) { $wp->do_log("LOG_DEBUG", "Validating arguments"); die "Invalid rotation delay: $delay" if (defined($delay) && $delay !~ m/^\d+$/); die "Invalid wallpaper path '$path'. Not a directory." if (defined($path) && !-d $path); -die "Invalid verbosity level: '$verbose'\n" if (defined($verbose) && $verbose =~ m/^[1-8]$/); +die "Invalid verbosity level: '$verbose'\n" if (defined($verbose) && $verbose !~ m/^[1-8]$/); $wp->do_log("LOG_DEBUG", "Configuring object"); $wp->{targets} = \@targets || undef;