fix: do not crash if disk_check_exclude.txt is not created yet
This commit is contained in:
@@ -524,6 +524,8 @@ echo "<table>
|
|||||||
$fp = @fopen($home."/BirdNET-Pi/scripts/disk_check_exclude.txt", 'r');
|
$fp = @fopen($home."/BirdNET-Pi/scripts/disk_check_exclude.txt", 'r');
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
$disk_check_exclude_arr = explode("\n", fread($fp, filesize($home."/BirdNET-Pi/scripts/disk_check_exclude.txt")));
|
$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") {
|
if($config["FULL_DISK"] == "purge") {
|
||||||
|
|||||||
Reference in New Issue
Block a user