From f4d3c65c2b56f4ee4ca314d50f792143f3d23ef3 Mon Sep 17 00:00:00 2001 From: Calvo Date: Fri, 17 Feb 2023 13:13:37 +0100 Subject: [PATCH] Fix error on pandoradb delete cookies file --- pandora_server/util/pandora_db.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 9a1f94b0ee..ac725d1a10 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -53,6 +53,9 @@ my $SMALL_OPERATION_STEP = 1000; # 1000 is default # Timeout for lock acquisition. my $LOCK_TIMEOUT = 60; +# Cron cookies file. +my $COOKIES_FILE = '/tmp/cron-session-cookies'; + # FLUSH in each IO $| = 1; @@ -1075,9 +1078,8 @@ sub pandora_delete_old_session_data { db_do ($dbh, "DELETE FROM tsessions_php WHERE data IS NULL OR id_session REGEXP '^cron-'"); # Delete cron cookies file - my $cookie_file = '/tmp/cron-session-cookies'; log_message ('PURGE', "Deleting cron session file"); - unlink($cookie_file) or die log_message ('PURGE', "Could not delete session file"); + unlink($COOKIES_FILE); }