Open Vexcited opened 10 months ago
Is this still an issue in rc
? If so, could you upload a minimal reproduction repo for us to try? I'm a bit confused as to why we only got a single report for this issue so i assume this is something app specific.
@FabianLars I have the same issue when opening a file asociated. Can be reproduced by sending the file path to the FE without using dialogs and executing readTextFile / readFile
Hmm, yeah the File Association feature does not extend the scope as far as i know. Or did you use the FsScope methods yourself and that's not saved?
I have no idea about those methods 😂. How are associated files expected to be handled? In this example there is no file manipulation
Hmmm, okay we either need to make it behave like the dialog api (auto adding the paths to the scope) or add the scope stuff in the example here https://github.com/tauri-apps/tauri/blob/dev/examples/file-associations/src-tauri/src/main.rs (scopes must be modified in rust).
Edit: I'll update the example in a few. Makes more sense than typing it out twice.
Okay, this is a bit messed up but here it is: https://github.com/tauri-apps/tauri/pull/10864/files - for you the interesting parts are the lines that are commented out :/ (the fs_scope() stuff)
Works perfectly that way. Thanks!
Hi!
I have an issue where the scope isn't getting restored after restarting the application. Wonder if that plugin supports it. If it doesn't, I'd have to have all the
*
variations in myfs
allow scope but I don't want this for security reasons.Here's what happening in my
main.rs
file, nothing special here.Then, in my app, I open a directory using the following piece of code :
Then I save the path inside
localStorage
. When the app gets restarted, it reads that value fromlocalStorage
and tries to open back the folder with the following function (also used when opening for the first time the folder throughopen
) :But whenever I restart the app, I get hit by a
Error: "forbidden path: C:\\..."
. Happens on development and production.Any idea ? Thanks !