Skip to content

Commit

Permalink
fix: try to solve the migration failed issue
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhat616 committed Jul 29, 2024
1 parent 6aa010e commit fdfe097
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions backend/tauri/src/core/migration/units/unit_160.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,8 @@ impl<'a> Migration<'a> for MigrateAppHomeDir {
let path = home_dir.join("profiles.yaml");
if path.exists() {
println!("Moving profiles.yaml to profiles dir");
fs_extra::file::move_file(
path,
crate::utils::dirs::app_profiles_dir()
.unwrap()
.join("profiles.yaml"),
&file_opts,
)
.map_err(|e| std::io::Error::new(std::io::ErrorKind::InvalidInput, e))?;
fs_extra::file::move_file(path, app_config_dir.join("profiles.yaml"), &file_opts)
.map_err(|e| std::io::Error::new(std::io::ErrorKind::InvalidInput, e))?;
}
// move profiles dir
let path = home_dir.join("profiles");
Expand Down
2 changes: 1 addition & 1 deletion backend/tauri/src/core/tray/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ impl Tray {
#[cfg(target_os = "windows")]
"copy_env_ps" => feat::copy_clash_env("ps"),
"open_app_config_dir" => crate::log_err!(ipc::open_app_config_dir()),
"open_app_data_dir" => crate::log_err!(ipc::open_app_config_dir()),
"open_app_data_dir" => crate::log_err!(ipc::open_app_data_dir()),
"open_core_dir" => crate::log_err!(ipc::open_core_dir()),
"open_logs_dir" => crate::log_err!(ipc::open_logs_dir()),
"restart_clash" => feat::restart_clash_core(),
Expand Down

0 comments on commit fdfe097

Please sign in to comment.