Fixed “state_file_absolute_path” check: now gancioff actually checks for its writeability too, instead of checking 2 times for its readability
This commit is contained in:
parent
865f4b09c6
commit
103699125f
1 changed files with 1 additions and 1 deletions
2
gancioff
2
gancioff
|
@ -273,7 +273,7 @@ if (is_null($opts['do-post'])) $opts['do-post']=true;
|
||||||
if (file_exists($conf['state_file_absolute_path'])) {
|
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_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 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=[];
|
$guids=[];
|
||||||
$buff=file($conf['state_file_absolute_path'],FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
|
$buff=file($conf['state_file_absolute_path'],FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
|
||||||
$graceTime=365*24*60*60;
|
$graceTime=365*24*60*60;
|
||||||
|
|
Loading…
Reference in a new issue