fix(vpn): handle non-file url on openvpn import
So openvpn import called to_file_path().unwrap(), which panics when the file picker hands back a non-file:// url (sandboxed portal, etc). the wireguard branch right above already handles this gracefully, so do the same: return a Message::Error with a new OpenVpnConfigPath kind instead of crashing. Fixes #1896 - [x] I have disclosed use of any AI generated code in my commit messages. - If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR. - In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment. - [x] I understand these changes in full and will be able to respond to review comments. - [x] My change is accurately described in the commit message. - [x] My contribution is tested and working as described. - [x] I have read the [Developer Certificate of Origin](https://developercertificate.org/) and certify my contribution under its conditions. Signed-off-by: James A DellaMorte <dellamorte.james@comcast.net> Co-authored-by: James A DellaMorte <dellamorte.james@comcast.net>
This commit is contained in:
parent
9155a1e902
commit
1dd478aeb2
2 changed files with 12 additions and 2 deletions
2
i18n/en/cosmic_settings.ftl
vendored
2
i18n/en/cosmic_settings.ftl
vendored
|
|
@ -198,6 +198,8 @@ vpn-error = VPN Error
|
|||
.connect = Failed to connect to VPN
|
||||
.connection-editor = Connection editor failed
|
||||
.connection-settings = Failed to get settings for active connections
|
||||
.openvpn-config-path = Invalid file path for OpenVPN config
|
||||
.openvpn-config-path-desc = Chosen file must be on a local file system.
|
||||
.updating-state = Failed to update network manager state
|
||||
.wireguard-config-path = Invalid file path for WireGuard config
|
||||
.wireguard-config-path-desc = Chosen file must be on a local file system.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue