Unable to import wireguard config if the filename isn't short
The bug was reported against Ubuntu Noble / gnome-control-center 46.0 on https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/2064320
I am unable to import a Wireguard .conf configuration file from the gnome-control-center's Network panel.
Parameters -> Network -> VPN -> + -> Import from file
Select the .conf file that was sent by my VPN provider, then click Open
Results in the following error (French) : Impossible d'importer la connexion VPN. Le fichier AirVPN_Canada_UDP-1637-Entry3.conf" est illisible ou ne contient pas d'informations de connexion VPN reconnues. Erreur: le greffon ne prend pas en charge la fonction d'importation. Fermer
Which roughly translates to : Unable to import VPN connection. The AirVPN_Canada_UDP-1637-Entry3.conf" file is unreadable or does not contain recognized VPN connection information. Error: The plugin does not support the import function. Close
Checking a bit existing bug I found #2679 (comment 1858503) which suggested that user fixed a similar problem by renaming his .conf to use a shorter filename.
The same trick worked for the Ubuntu reporter
Whoa you nailed it. The code fails if the filename + extension is > 20 characters long. It handles the path name length correctly, it fails only if the filename + extension is longer than 20 characters.