summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2018-11-01 12:36:54 +0100
committerJustus Winter <justus@sequoia-pgp.org>2018-11-01 15:14:01 +0100
commit53e7e60e1aa431c0741f31cb5a9e8d416c4c528b (patch)
tree771d2c7dc0a9809713e48a6ba17a6674fd14dbc6 /core
parent0c349a6e3b157151d6a6c9a69c3dd17f5eec73bf (diff)
core: Avoid use of deprecated function.
Diffstat (limited to 'core')
-rw-r--r--core/Cargo.toml1
-rw-r--r--core/src/lib.rs4
2 files changed, 3 insertions, 2 deletions
diff --git a/core/Cargo.toml b/core/Cargo.toml
index 3c903283..33298259 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -4,5 +4,6 @@ version = "0.1.0"
authors = ["Justus Winter <justus@pep-project.org>"]
[dependencies]
+dirs = "1.0"
failure = "0.1.2"
tempdir = "0.3.5"
diff --git a/core/src/lib.rs b/core/src/lib.rs
index 0fb66062..f5a26e3a 100644
--- a/core/src/lib.rs
+++ b/core/src/lib.rs
@@ -18,11 +18,11 @@
/// # }
/// ```
+extern crate dirs;
extern crate tempdir;
#[macro_use]
extern crate failure;
-use std::env;
use std::fmt;
use std::fs;
use std::io;
@@ -217,7 +217,7 @@ impl Config {
} else {
if home_not_set {
c.home =
- env::home_dir().ok_or(
+ dirs::home_dir().ok_or(
format_err!("Failed to get users home directory"))?
.join(".sequoia");
}