summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-04-10 10:10:20 +0300
committerLars Wirzenius <liw@liw.fi>2021-04-10 10:29:27 +0300
commit9243bc30891fc9db615560da8af83cf715664d9a (patch)
treee3ab9a5affb151993fc9caf895b5c924ffc552d4 /src/config.rs
parent958839c264b3ef36ef1bc74a4794fc383cc39292 (diff)
downloadobnam2-9243bc30891fc9db615560da8af83cf715664d9a.tar.gz
refactor: have ClientConfigWithoutPasswords know its filename
This allows Init::run to not need to be given it as an argument.
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 41ddcd6..d6ffbc5 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -52,6 +52,7 @@ impl ClientConfig {
#[derive(Debug, Serialize, Clone)]
pub struct ClientConfigWithoutPasswords {
+ pub filename: PathBuf,
pub server_url: String,
pub verify_tls_cert: bool,
pub chunk_size: usize,
@@ -92,6 +93,7 @@ impl ClientConfigWithoutPasswords {
let encrypt = tentative.encrypt.or(Some(false)).unwrap();
let config = Self {
+ filename: filename.to_path_buf(),
server_url: tentative.server_url,
roots: tentative.roots,
verify_tls_cert: tentative.verify_tls_cert.or(Some(false)).unwrap(),