Support: ignore disk_free_space if the function is unavailable (#1970)

This commit is contained in:
ArthurHoaro 2023-04-08 10:10:29 -04:00 committed by GitHub
parent 739776a754
commit e0a8f961ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -168,6 +168,10 @@ class BookmarkIO
*/
public function checkDiskSpace(string $data): bool
{
if (function_exists('disk_free_space') === false) {
return true;
}
return disk_free_space(dirname($this->datastore)) > (strlen($data) + 1024 * 500);
}
}