mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-17 22:39:42 +02:00
Fix window path issue
This commit is contained in:
@@ -1304,6 +1304,7 @@ pub fn run() {
|
||||
),
|
||||
color: Some(Color::Danger),
|
||||
icon: None,
|
||||
timeout: None,
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
@@ -134,6 +134,7 @@ pub(crate) async fn handle_plugin_event<R: Runtime>(
|
||||
resp.error
|
||||
),
|
||||
color: Some(Color::Danger),
|
||||
timeout: None,
|
||||
..Default::default()
|
||||
}),
|
||||
None,
|
||||
|
||||
@@ -47,6 +47,7 @@ pub(crate) async fn handle_deep_link<R: Runtime>(
|
||||
message: format!("Installed {name}@{}", pv.version),
|
||||
color: Some(Color::Success),
|
||||
icon: None,
|
||||
timeout: Some(5000),
|
||||
},
|
||||
)?;
|
||||
}
|
||||
@@ -90,6 +91,7 @@ pub(crate) async fn handle_deep_link<R: Runtime>(
|
||||
message: "Failed to import data".to_string(),
|
||||
color: Some(Color::Danger),
|
||||
icon: None,
|
||||
timeout: None,
|
||||
},
|
||||
)?;
|
||||
return Ok(());
|
||||
@@ -103,6 +105,7 @@ pub(crate) async fn handle_deep_link<R: Runtime>(
|
||||
message: format!("Imported data for {} workspaces", results.workspaces.len()),
|
||||
color: Some(Color::Success),
|
||||
icon: None,
|
||||
timeout: Some(5000),
|
||||
},
|
||||
)?;
|
||||
}
|
||||
|
||||
@@ -56,8 +56,9 @@ pub(crate) fn create_window<R: Runtime>(
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
{
|
||||
use std::fs;
|
||||
let dir = handle.path().app_data_dir()?.join("window-sessions").join(key);
|
||||
fs::create_dir_all(dir.clone())?;
|
||||
let safe_key = format!("{:x}", md5::compute(key.as_bytes()));
|
||||
let dir = handle.path().app_data_dir()?.join("window-sessions").join(safe_key);
|
||||
fs::create_dir_all(&dir)?;
|
||||
win_builder = win_builder.data_directory(dir);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user