Fix: Test the RTP itself as well

This fixes the problem that the user sometimes passes the configuration
via the commandline. In this case, the "rtp" variable itself is the
configuration file path. With this fix applied, we check this value
before generating the variants and trying them.
This commit is contained in:
Matthias Beyer 2016-05-28 23:03:04 +02:00
parent ac89856e1c
commit d50f8b3d0d

View file

@ -143,6 +143,7 @@ fn fetch_config(rtp: &PathBuf) -> Result<Value> {
}; };
vec![ vec![
vec![rtp.clone()],
gen_vars(rtp.clone(), variants.clone(), &modifier), gen_vars(rtp.clone(), variants.clone(), &modifier),
env::var("HOME").map(|home| gen_vars(PathBuf::from(home), variants.clone(), &modifier)) env::var("HOME").map(|home| gen_vars(PathBuf::from(home), variants.clone(), &modifier))