fix: do not error out when disk_check_exclude.txt does not exist yet

This commit is contained in:
frederik
2024-02-20 10:42:35 +01:00
parent 0d601f0bcf
commit 6da33df8e9
+2
View File
@@ -465,6 +465,8 @@ if(isset($_GET['species'])){ ?>
$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 = [];
}
$name = $_GET['species'];