* Revert "Replace `std::env::home_dir` with `dirs::home_dir` (#9077)"
This reverts commit 7e779327eb.
* Restore some of the changes
* Update parity-common
This commit is contained in:
committed by
Marek Kotewicz
parent
01f825b0e1
commit
acae643a4a
@@ -17,12 +17,13 @@
|
||||
//! Parity upgrade logic
|
||||
|
||||
use semver::{Version, SemVerError};
|
||||
use std::collections::HashMap;
|
||||
use std::collections::*;
|
||||
use std::fs::{self, File, create_dir_all};
|
||||
use std::env;
|
||||
use std::io;
|
||||
use std::io::{Read, Write};
|
||||
use std::path::{PathBuf, Path};
|
||||
use dir::{DatabaseDirectories, default_data_path, home_dir};
|
||||
use dir::{DatabaseDirectories, default_data_path};
|
||||
use dir::helpers::replace_home;
|
||||
use journaldb::Algorithm;
|
||||
|
||||
@@ -105,7 +106,7 @@ fn with_locked_version<F>(db_path: Option<&str>, script: F) -> Result<usize, Err
|
||||
where F: Fn(&Version) -> Result<usize, Error>
|
||||
{
|
||||
let mut path = db_path.map_or({
|
||||
let mut path = home_dir().expect("Applications should have a home dir");
|
||||
let mut path = env::home_dir().expect("Applications should have a home dir");
|
||||
path.push(".parity");
|
||||
path
|
||||
}, PathBuf::from);
|
||||
|
||||
Reference in New Issue
Block a user