mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-09-22 10:45:59 -04: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:
1 parent
fee527536c
commit
eb8d83df6e
1 file changed
+3
-1
@@ -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