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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user