mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-12-04 21:30:06 +08:00
fix(profile): preserve storage recovery details in refresh errors
This commit is contained in:
@@ -143,13 +143,10 @@ pub async fn create_profile(item: ProfileCreate, file_data: Option<std::string::
|
||||
#[specta::specta]
|
||||
pub async fn update_profile(index: std::string::String, option: Option<PrfOption>) -> CmdResult {
|
||||
let index: String = index.into();
|
||||
match feat::update_profile(&index, option.as_ref(), true).await {
|
||||
Ok(_) => Ok(()),
|
||||
Err(e) => {
|
||||
logging!(error, Type::Cmd, "update profile failed: {e:#}");
|
||||
Err(coded_error("PROFILE_UPDATE_FAILED", e))
|
||||
}
|
||||
}
|
||||
feat::update_profile(&index, option.as_ref(), true)
|
||||
.await
|
||||
.inspect_err(|e| logging!(error, Type::Cmd, "update profile failed: {e:#}"))
|
||||
.with_error_code("PROFILE_UPDATE_FAILED")
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
|
||||
Reference in New Issue
Block a user