Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eframe: panic if user does not have Permission to write to local app storage #3135

Closed
jleibs opened this issue Jul 4, 2023 · 0 comments · Fixed by #3230
Closed

eframe: panic if user does not have Permission to write to local app storage #3135

jleibs opened this issue Jul 4, 2023 · 0 comments · Fixed by #3230
Assignees
Labels
bug Something is broken
Milestone

Comments

@jleibs
Copy link
Contributor

jleibs commented Jul 4, 2023

Describe the bug
If the user does not have access to create a file in their app directory, eframe panics on an unwrap.

To Reproduce

Remove your existing app storage, and then modify your app directory to prevent user access.

rm -rf /home/jleibs/.local/share/rerun/app.ron
sudo chown root.root /home/jleibs/.local/share/rerun/

Expected behavior
A warning is printed but the app doesn't panic.

Screenshots

Desktop (please complete the following information):

  • OS: Ubuntu 22.10

Additional context

thread 'ThreadId(24)' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', eframe-0.22.0/src/native/file_storage.rs:84

   6: core::panicking::panic_fmt
             at core/src/panicking.rs:64:14
   7: core::result::unwrap_failed
             at core/src/result.rs:1750:5
   8: <eframe::native::file_storage::FileStorage as eframe::epi::Storage>::flush::{{closure}}
@jleibs jleibs added the bug Something is broken label Jul 4, 2023
@emilk emilk added this to the 0.23.0 milestone Aug 10, 2023
@emilk emilk self-assigned this Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants