You don't know when this code was written or what the original purpose was. User agent detection used to be a best practice. Onedrive for business is a mountain of legacy software going from sharepoint to groove to who knows what. This bug could be buried in some library that was written 5+ years ago. Maliciously going out of your way to not support Linux sounds like a good way to have your code review rejected.