To reproduce:
- Install Flatpak
flatpak install net.ankiweb.Anki
flatpak run net.ankiweb.Anki
- Create a deck with a card with the Anki UI
- Export the deck to a text file (UI option “notes in plain text”)
- In the file chooser, change your target directory from the default (e.g.
/run/user/1000/doc/25baf4eb
) to something normal (e.g./home/jrpear
) - In the file chooser, name the file something without the right extension (e.g.
my-deck
notmy-deck.txt
) - Save the file
Expected Behavior:
- There is a new file in the target directory (
/home/jrpear
)
Actual Behavior:
- There is no new file in the target directory (
/home/jrpear
) - There is no new file in the initially suggested directory (
/run/user/1000/doc/25baf4eb
) -
In the
net.ankiweb.Anki
namespace, there is a new file in a different directory (/run/user/1000/doc/10c4db7e
); that file has the right extension (/run/user/1000/doc/10c4db7e/my-deck.txt
) - See this with
flatpak enter net.ankiweb.Anki find /run -name '*my-deck*'
Other notes:
- That second directory
/run/user/1000/doc/10c4db7e
is the new suggested directory next time you try to export. But if you again don’t type out the file extension in the file chooser, the file wont be placed there to be transported to the host. Instead it’s placed in some other directory only visible in the Anki namespace, which will in turn be suggested to the user on the next export. - I think I’ve stressed this enough, but this only happens when the extension isn’t typed out. If the user specifies a file name that already has the right extension, everything works perfectly.
- If you try to save in the suggested directory, Anki hangs and doesn’t respond to a SIGTERM. The suggested directory should probably be fixed too.
My system
I’m running Debian unstable, with GNOME 43.1 (Wayland). Flatpak version 1.14.1. Anki version 2.1.56.