mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-09-13 06:07:30 -04:00
The previous check read the OneDrive environment variables and matched path prefixes, so it missed Dropbox, Google Drive and iCloud, and had its own guesswork to get wrong. Every sync engine that serves files on demand registers a sync root with the Cloud Files API, and CfGetSyncRootInfoByPath answers directly whether a path sits under one. That covers every provider without naming any of them, and it replaces the environment lookups, path canonicalisation and prefix matching rather than adding to them. Asking for the provider info class also gets the provider's own name, so the message can say Dropbox rather than a generic phrase. The buffers are plain byte arrays read by hand: nothing here can be verified away from Windows, so there is no marshalling to get subtly wrong. Detection cannot produce a false positive now, since the answer is Windows' rather than an inference from a folder name. The warning still appears only in the incomplete-upgrade message, where something has already failed, so a folder someone deliberately keeps fully downloaded never prompts anything. Co-authored-by: rmcrackan <rmcrackan@gmail.com>