feat: Remove UNC prefix in paths returned to the frontend (#1168)

* feat: Remove UNC prefix in paths returned to the frontend

* that one doesn't count

* map instead of mut

* revert accidental ipc::response change

* move dunce to workspace root
This commit is contained in:
Fabian-Lars
2024-04-17 15:49:32 +02:00
committed by GitHub
parent 6698774f3f
commit bb51a41d67
7 changed files with 35 additions and 6 deletions
+1
View File
@@ -22,3 +22,4 @@ serde_json = { workspace = true }
tauri = { workspace = true }
log = { workspace = true }
thiserror = { workspace = true }
dunce = { workspace = true }
+2 -1
View File
@@ -58,7 +58,8 @@ impl<R: Runtime> StoreBuilder<R> {
/// ```
pub fn new<P: AsRef<Path>>(path: P) -> Self {
Self {
path: path.as_ref().to_path_buf(),
// Since Store.path is only exposed to the user in emit calls we may as well simplify it here already.
path: dunce::simplified(path.as_ref()).to_path_buf(),
defaults: None,
cache: Default::default(),
serialize: default_serialize,