Closed jgaehring closed 4 months ago
Somewhat related to this and #27 (but perhaps worthy of a separate issue) is to work out the best place to store this file for the binary we actually distribute to users.
From #33:
It looks like I didn't actually fix #24 like I thought. Running the
.AppImage
and doing anything that tries to write to the file system crashes the whole app. I neglected to read the docs on Embedding Additional Files.
I guess this isn't technically the same issue, where the directory doesn't exist so it crashes. It's more a matter of the Tauri config and maybe some file permissions. Docs look pretty straightforward though, so hopefully a quick fix.
I wound up just moving all the file system operations to the TypeScript frontend (e99b8d5), since most of the Tauri fs
API seems geared towards that end. I'm sure that it's possible to do all the same more directly with the Tauri Rust API, or more likely, just by using the Rust std lib's fs
API. That will certainly improve performance for more advanced data storage and networking in the future, but none of that is strictly necessary at the moment.
This is a result of c3ac7b0 and should be pretty simple to fix but I'm focusing on the frontend at the moment. Basically we just need to check the directory is there and if not create it before trying to open the path. Simple, but I want to use it to familiarize myself a little better with Rust standard library for working with the file system, best practices, etc.