diff options
Diffstat (limited to 'src/utils.rs')
| -rw-r--r-- | src/utils.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/utils.rs b/src/utils.rs index ffe691e..e602932 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -28,7 +28,12 @@ pub fn already_downloaded(dir: &str) -> BTreeSet<String> { } pub fn get_podcast_dir() -> PathBuf { - let mut path = env::home_dir().unwrap(); - path.push("Podcasts"); - path + match env::var_os("PODCAST") { + Some(val) => PathBuf::from(val), + None => { + let mut path = env::home_dir().unwrap(); + path.push("Podcasts"); + path + } + } } |
