mirror of
https://github.com/YGGverse/agate.git
synced 2026-04-09 04:55:27 +00:00
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:
parent
8fd9ca15c3
commit
bd9ed3255a
4 changed files with 36 additions and 12 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue