Attachment and file downloads always opened the folder the platform
suggests, with no way to change it (#71). The save dialog is built in a
single place, `DocumentDialog::file_dialog`, which never called
`set_directory`.
Settings → General now carries a Download location card to pick a folder
or reset to the platform default. The stored path is resolved when a
download is saved, not when the path is stored: a location can become
unavailable later, such as an unmounted network share, so a download
falls back to the platform default instead of failing.
The setting covers mail attachments and the Files view, which share
`DocumentProvider::export`. Import dialogs keep the platform default,
since a download location does not describe where files are read from.
Tests cover path resolution (empty, missing, a file instead of a
directory, and a usable directory), the dialog built from the setting,
and that settings blobs written before this field still load.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Compose attachments, account-backup export/import and database-snapshot
export still opened desktop file dialogs directly, so on mobile they
reported "no picker" even though the host provides a DocumentProvider.
- DocumentProvider::import_many() imports several documents for one action
(default: repeat import() until the picker is cancelled; the desktop
provider uses one multi-select dialog). Imported documents stay alive in
the composer until Core has staged the attachments.
- Compose attachments use import_many() instead of rfd::FileDialog.
- Backup export/import stage one app-private file and hand it to the
provider; the existing import logic keeps its synchronous shape on the UI
thread executor.
- Database snapshots keep Core's verified snapshot, archive it as one zip
(hosts export files, not folders) and pass it to the provider. Staging
stays outside the data/cache roots Core requires.
- Desktop behavior is unchanged: same dialogs and file names.