From 996de3c67d490b4052bd16179b229b30c2f890f8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 27 Sep 2021 02:53:07 -0500 Subject: config: get_1: use full parameter name Instead of passing the prefix section and key separately, pass them together as is commonly done with git-config(1) usage as well as our ->get_all API. This inconsistency in the get_1 API is a needless footgun and confused me a bit while working on "lei up" the other week. --- lib/PublicInbox/LeiNoteEvent.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/LeiNoteEvent.pm') diff --git a/lib/PublicInbox/LeiNoteEvent.pm b/lib/PublicInbox/LeiNoteEvent.pm index 2a7b52c1..1b714dae 100644 --- a/lib/PublicInbox/LeiNoteEvent.pm +++ b/lib/PublicInbox/LeiNoteEvent.pm @@ -73,7 +73,7 @@ sub lei_note_event { $lei->{opt}->{quiet} = 1; eval { $lms->arg2folder($lei, [ $folder ]) }; return if $@; - my $state = $cfg->get_1("watch.$folder", 'state') // 'tag-rw'; + my $state = $cfg->get_1("watch.$folder.state") // 'tag-rw'; return if $state eq 'pause'; return $lms->clear_src($folder, \$bn) if $new_cur eq ''; $lms->lms_pause; -- cgit v1.2.3-24-ge0c7