chore: fix Rust formatting
Some checks failed
Test / rust-tests (push) Waiting to run
Test / frontend-typecheck (push) Waiting to run
Test / frontend-tests (push) Waiting to run
Auto Tag / auto-tag (push) Successful in 5s
Test / rust-fmt-check (push) Successful in 2m5s
Release / build-linux-arm64 (push) Failing after 2m10s
Release / build-macos-arm64 (push) Successful in 5m15s
Test / rust-clippy (push) Has been cancelled
Release / build-windows-amd64 (push) Has been cancelled
Release / build-linux-amd64 (push) Has been cancelled
Some checks failed
Test / rust-tests (push) Waiting to run
Test / frontend-typecheck (push) Waiting to run
Test / frontend-tests (push) Waiting to run
Auto Tag / auto-tag (push) Successful in 5s
Test / rust-fmt-check (push) Successful in 2m5s
Release / build-linux-arm64 (push) Failing after 2m10s
Release / build-macos-arm64 (push) Successful in 5m15s
Test / rust-clippy (push) Has been cancelled
Release / build-windows-amd64 (push) Has been cancelled
Release / build-linux-amd64 (push) Has been cancelled
Apply cargo fmt to fix CI formatting check failures. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
0235541c9b
commit
484bfbe089
@ -160,18 +160,21 @@ pub async fn export_document(
|
|||||||
// Determine the output directory
|
// Determine the output directory
|
||||||
let base_dir = if output_dir.is_empty() || output_dir == "." {
|
let base_dir = if output_dir.is_empty() || output_dir == "." {
|
||||||
// Try to use the Downloads directory, fall back to app data dir
|
// Try to use the Downloads directory, fall back to app data dir
|
||||||
dirs::download_dir()
|
dirs::download_dir().unwrap_or_else(|| {
|
||||||
.unwrap_or_else(|| {
|
let app_data = state.app_data_dir.clone();
|
||||||
let app_data = state.app_data_dir.clone();
|
app_data.join("exports")
|
||||||
app_data.join("exports")
|
})
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
PathBuf::from(&output_dir)
|
PathBuf::from(&output_dir)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Ensure the directory exists
|
// Ensure the directory exists
|
||||||
std::fs::create_dir_all(&base_dir).map_err(|e| {
|
std::fs::create_dir_all(&base_dir).map_err(|e| {
|
||||||
format!("Failed to create export directory {}: {}", base_dir.display(), e)
|
format!(
|
||||||
|
"Failed to create export directory {}: {}",
|
||||||
|
base_dir.display(),
|
||||||
|
e
|
||||||
|
)
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
let safe_title: String = title
|
let safe_title: String = title
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user