diff options
author | Alexander Batischev <eual.jp@gmail.com> | 2021-04-21 00:38:29 +0300 |
---|---|---|
committer | Alexander Batischev <eual.jp@gmail.com> | 2021-04-21 02:05:55 +0300 |
commit | 9c3893cf616279e4101b1ccf52d0a82b7a334b3b (patch) | |
tree | b8ff5b6438252a5c08ae00c796625a00ae453643 /src/config.rs | |
parent | 645392adb2c12649fc72164422fecb15993046e8 (diff) | |
download | obnam2-9c3893cf616279e4101b1ccf52d0a82b7a334b3b.tar.gz |
feat: add support for CACHEDIR.TAG
Fixes #78.
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index d6ffbc5..6881959 100644 --- a/src/config.rs +++ b/src/config.rs @@ -17,6 +17,7 @@ struct TentativeClientConfig { roots: Vec<PathBuf>, log: Option<PathBuf>, encrypt: Option<bool>, + exclude_cache_tag_directories: Option<bool>, } #[derive(Debug, Serialize, Clone)] @@ -59,6 +60,7 @@ pub struct ClientConfigWithoutPasswords { pub roots: Vec<PathBuf>, pub log: PathBuf, pub encrypt: bool, + pub exclude_cache_tag_directories: bool, } #[derive(Debug, thiserror::Error)] @@ -91,6 +93,7 @@ impl ClientConfigWithoutPasswords { let tentative: TentativeClientConfig = serde_yaml::from_str(&config)?; let encrypt = tentative.encrypt.or(Some(false)).unwrap(); + let exclude_cache_tag_directories = tentative.exclude_cache_tag_directories.unwrap_or(true); let config = Self { filename: filename.to_path_buf(), @@ -103,6 +106,7 @@ impl ClientConfigWithoutPasswords { .or_else(|| Some(PathBuf::from(DEVNULL))) .unwrap(), encrypt, + exclude_cache_tag_directories, }; config.check()?; |