From 6e6e9eab089ff908af777d0875d89e79fe76a6c2 Mon Sep 17 00:00:00 2001 From: frederik Date: Wed, 15 May 2024 09:28:25 +0200 Subject: [PATCH] fix: do not crash if disk_check_exclude.txt is not created yet --- scripts/play.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/play.php b/scripts/play.php index e310965..a7dcc68 100644 --- a/scripts/play.php +++ b/scripts/play.php @@ -521,9 +521,11 @@ echo " $filename_formatted = $date."/".$comname."/".$results['File_Name']; // add disk_check_exclude.txt lines into an array for grepping - $fp = @fopen($home."/BirdNET-Pi/scripts/disk_check_exclude.txt", 'r'); + $fp = @fopen($home."/BirdNET-Pi/scripts/disk_check_exclude.txt", 'r'); if ($fp) { $disk_check_exclude_arr = explode("\n", fread($fp, filesize($home."/BirdNET-Pi/scripts/disk_check_exclude.txt"))); + } else { + $disk_check_exclude_arr = []; } if($config["FULL_DISK"] == "purge") {