One possible half-solution is to first try to mount the location. If we can do so without needing to prompt the user, we're good. Else fallback to the current code. This will catch tricky cases of SSH redirection, as long as the user has saved their SSH password.
If they haven't... I don't know of a good solution to make it work seemlessly for all SSH cases. Maybe a gsettings key could be added to disable network checking.
One possible half-solution is to first try to mount the location. If we can do so without needing to prompt the user, we're good. Else fallback to the current code. This will catch tricky cases of SSH redirection, as long as the user has saved their SSH password.
If they haven't... I don't know of a good solution to make it work seemlessly for all SSH cases. Maybe a gsettings key could be added to disable network checking.