From 4ba198be51d3c86b9baa8b548d872089d2b5db8a Mon Sep 17 00:00:00 2001 From: sergiotarxz Date: Mon, 6 May 2024 21:51:24 +0200 Subject: [PATCH] Fixing fast error with gts bot pid not existing. --- lib/GTSRSSApi.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/GTSRSSApi.pm b/lib/GTSRSSApi.pm index eb65445..b9ba7f8 100644 --- a/lib/GTSRSSApi.pm +++ b/lib/GTSRSSApi.pm @@ -61,7 +61,7 @@ sub startup ($self) { my $gts_bot_pid = path('last_pid_started_gts_bot'); if (-f $pidfile) { my $pidfile_content = $pidfile->slurp; - if ($pidfile_content eq $gts_bot_pid->slurp) { + if (-f $gts_bot_pid && $pidfile_content eq $gts_bot_pid->slurp) { return; } $gts_bot_pid->spew($pidfile_content);