fix: do not crash if disk_check_exclude.txt is not created yet

This commit is contained in:
frederik
2024-05-15 09:28:25 +02:00
parent 43fcc09f4f
commit 6e6e9eab08
+3 -1
View File
@@ -521,9 +521,11 @@ echo "<table>
$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") {