mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-02-20 07:37:26 -05:00
fix: improve readability of environment variable retrieval in indexing harness
Refactored the environment variable retrieval logic for Windows to enhance clarity by adding additional line breaks. This change maintains the existing functionality while making the code easier to read and understand.
This commit is contained in:
@@ -53,7 +53,9 @@ impl IndexingHarnessBuilder {
|
||||
// Use home directory for proper filesystem watcher support on macOS
|
||||
// On Windows, use USERPROFILE; on Unix, use HOME
|
||||
let home = if cfg!(windows) {
|
||||
std::env::var("USERPROFILE").unwrap_or_else(|_| std::env::var("TEMP").unwrap_or_else(|_| "C:\\temp".to_string()))
|
||||
std::env::var("USERPROFILE").unwrap_or_else(|_| {
|
||||
std::env::var("TEMP").unwrap_or_else(|_| "C:\\temp".to_string())
|
||||
})
|
||||
} else {
|
||||
std::env::var("HOME").unwrap_or_else(|_| "/tmp".to_string())
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user