Read picked import files through the fs plugin so Android content URIs work

On Android the open dialog returns a content:// URI, which std::fs can't
open, so ManaBox/library and deck imports failed with "no such file or
directory". Read them via tauri-plugin-fs, which resolves content URIs and
falls through to plain paths on desktop.

Closes #24
This commit is contained in:
2026-10-23 22:01:33 -05:00
parent 18948efd17
commit 5f19ddfa4a
4 changed files with 16 additions and 3 deletions

View File

@@ -37,6 +37,7 @@ pub(crate) fn logged<T>(what: &str, result: Result<T, String>) -> Result<T, Stri
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
let builder = tauri::Builder::default().plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_fs::init())
.plugin(tauri_plugin_opener::init());
// Android gets sync sign-ins back through the `mtgc://` scheme; desktop
// uses a loopback port instead and needs no scheme registered.