Skip to content

Commit e467175

Browse files
committed
use std::env::home_dir on unix
1 parent 0f3101a commit e467175

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/unix.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,11 +387,12 @@ fn open_using_xdg_config(config_path: &PathBuf, options: &BrowserOptions, url: &
387387
fn get_xdg_dirs() -> Vec<PathBuf> {
388388
let mut xdg_dirs: Vec<PathBuf> = Vec::new();
389389

390+
#[allow(deprecated)]
390391
let data_home = std::env::var("XDG_DATA_HOME")
391392
.ok()
392393
.map(PathBuf::from)
393394
.filter(|path| path.is_absolute())
394-
.or_else(|| std::sys::os::home_dir().map(|path| path.join(".local/share")));
395+
.or_else(|| std::env::home_dir().map(|path| path.join(".local/share")));
395396
if let Some(data_home) = data_home {
396397
xdg_dirs.push(data_home);
397398
}

0 commit comments

Comments
 (0)