$ flatpak remote-add kdelocal `pwd`/repo --gpg-import=~/kdeflatpak.gpg
error: The file ~/kdeflatpak.gpg specified for --gpg-import was not found: Error opening file /home/apol/tmp/flatpak-kde-runtime/~/kdeflatpak.gpg: No such file or directory
Hmm, tildes are typically expanded by the shell, so apps don't even see them. I guess this is not actually true unless the tilde is the first element in an argument though:
$ echo ~/foo --bar=~/foo
I somewhat dislike doing magic parsing of ~ in the app, because that means we can never handle files that actually have tildes in them (no way to escape the magic). Maybe that is not a huge deal for the particular case of gpg key files though...
Support relative pathnames in various --gpg=FILE commandline options
We juse use g_file_new_for_commandline_arg instead of g_file_new_for_path.
This is somewhat related to #401
but doesn't actually handle the specific case of tilde.
I had the same problem myself: #197