From 103699125fa6cba8939695a4fac0e43538d12dcd Mon Sep 17 00:00:00 2001 From: pezcurrel Date: Thu, 24 Oct 2024 12:59:41 +0200 Subject: [PATCH] =?UTF-8?q?Fixed=20=E2=80=9Cstate=5Ffile=5Fabsolute=5Fpath?= =?UTF-8?q?=E2=80=9D=20check:=20now=20gancioff=20actually=20checks=20for?= =?UTF-8?q?=20its=20writeability=20too,=20instead=20of=20checking=202=20ti?= =?UTF-8?q?mes=20for=20its=20readability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gancioff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gancioff b/gancioff index 0867817..a66f7c8 100755 --- a/gancioff +++ b/gancioff @@ -273,7 +273,7 @@ if (is_null($opts['do-post'])) $opts['do-post']=true; if (file_exists($conf['state_file_absolute_path'])) { if (!is_file($conf['state_file_absolute_path'])) dieYoung("Error: «{$conf['state_file_absolute_path']}» exists but it’s not a file.\n",1); if (!is_readable($conf['state_file_absolute_path'])) dieYoung("Error: «{$conf['state_file_absolute_path']}» exists but it’s not readable.\n",1); - if (!is_readable($conf['state_file_absolute_path'])) dieYoung("Error: «{$conf['state_file_absolute_path']}» exists but it’s not writable.\n",1); + if (!is_writeable($conf['state_file_absolute_path'])) dieYoung("Error: «{$conf['state_file_absolute_path']}» exists but it’s not writable.\n",1); $guids=[]; $buff=file($conf['state_file_absolute_path'],FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES); $graceTime=365*24*60*60;