From 04fdac88918a32c8d4720e9e40ad3c64c2785560 Mon Sep 17 00:00:00 2001 From: eleksir Date: Sat, 13 Mar 2021 17:25:43 +0300 Subject: [PATCH] i3status-anyevent: fix incorrect vpn status file mtime check --- i3status-anyevent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i3status-anyevent b/i3status-anyevent index 3684c99..a088542 100644 --- a/i3status-anyevent +++ b/i3status-anyevent @@ -574,7 +574,7 @@ sub add_events () { my $mtime = (stat $CONF->{vpn}->{statusfile}) [8]; if (defined $mtime) { - if (($mtime - $file_check_mtime) < $CONF->{vpn}->{mtime_threshold}) { + if ((time () - $mtime) < $CONF->{vpn}->{mtime_threshold}) { $file_check = 1; } else { $file_check = 0;