vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit bf446f44f97a5f9df7c7c274e5d78981b6b2287c
parent 621f60729749592ecd734c0bc42ff4437ca70a5c
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Thu, 11 Apr 2019 15:41:13 +0200

Enable DATA_FOLDER to affect default CONFIG_FILE path

Diffstat:
Msrc/config.rs | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/config.rs b/src/config.rs @@ -9,7 +9,10 @@ lazy_static! { println!("Error loading config:\n\t{:?}\n", e); exit(12) }); - pub static ref CONFIG_FILE: String = get_env("CONFIG_FILE").unwrap_or_else(|| "data/config.json".into()); + pub static ref CONFIG_FILE: String = { + let data_folder = get_env("DATA_FOLDER").unwrap_or_else(|| String::from("data")); + get_env("CONFIG_FILE").unwrap_or_else(|| format!("{}/config.json", data_folder)) + }; } pub type Pass = String;