You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since these two paths point to the same store file and load from/save to the same file, it feels to me like with_store should key on the absolute path constructed by load and save instead of just whatever the caller gives it.
Happy to throw together a quick PR in this direction if we think it makes sense!
The text was updated successfully, but these errors were encountered:
Came across an interesting edge case today in the store plugin. If I create a store in JS like this:
and I try to access it from Rust like this:
these will load from and save to the same file on the filesystem (thanks to https://github.com/tauri-apps/plugins-workspace/blob/v1/plugins/store/src/store.rs#L179), but they'll be cached separately because
with_store
just uses the key you give it (which in this case is an absolute path in JS and a relative path in Rust) - the line in question is here: https://github.com/tauri-apps/plugins-workspace/blob/v1/plugins/store/src/lib.rs#L57.Since these two paths point to the same store file and load from/save to the same file, it feels to me like
with_store
should key on the absolute path constructed byload
andsave
instead of just whatever the caller gives it.Happy to throw together a quick PR in this direction if we think it makes sense!
The text was updated successfully, but these errors were encountered: