add central configuration mode

also slight correction of the documentation because we are now using YAML
(a space is now required behind the colon)
This commit is contained in:
Johann150 2021-02-11 08:57:59 +01:00
parent 8fd9ca15c3
commit bd9ed3255a
No known key found for this signature in database
GPG key ID: 9EE6577A2A06F8F1
4 changed files with 36 additions and 12 deletions

View file

@ -193,7 +193,12 @@ impl FileOptions {
/// working/content directory. If inconsisten file paths are used, this can
/// lead to loading and storing sidecar files multiple times.
pub fn get(&mut self, file: &PathBuf) -> PresetMeta {
let dir = file.parent().expect("no parent directory").to_path_buf();
let dir = if super::ARGS.central_config {
super::ARGS.content_dir.clone()
} else {
file.parent().expect("no parent directory").to_path_buf()
};
if self.check_outdated(&dir) {
self.read_database(&dir);
}