rename get_pacdef_group_dir to get_group_dir
This commit is contained in:
@@ -11,7 +11,7 @@ use crate::args;
|
||||
use crate::backend::{Backend, Backends, ToDoPerBackend};
|
||||
use crate::cmd::run_edit_command;
|
||||
use crate::env::get_single_var;
|
||||
use crate::path::get_pacdef_group_dir;
|
||||
use crate::path::get_group_dir;
|
||||
use crate::review;
|
||||
use crate::search;
|
||||
use crate::ui::get_user_confirmation;
|
||||
@@ -124,7 +124,7 @@ impl Pacdef {
|
||||
|
||||
#[allow(clippy::unused_self)]
|
||||
fn edit_group_files(&self, groups: &ArgMatches) -> Result<()> {
|
||||
let group_dir = crate::path::get_pacdef_group_dir()?;
|
||||
let group_dir = crate::path::get_group_dir()?;
|
||||
|
||||
let files: Vec<_> = groups
|
||||
.get_many::<String>("group")
|
||||
@@ -248,7 +248,7 @@ impl Pacdef {
|
||||
#[allow(clippy::unused_self)]
|
||||
fn import_groups(&self, args: &ArgMatches) -> Result<()> {
|
||||
let files = args::get_absolutized_file_paths(args)?;
|
||||
let groups_dir = get_pacdef_group_dir()?;
|
||||
let groups_dir = get_group_dir()?;
|
||||
|
||||
for target in files {
|
||||
let target_name = target
|
||||
@@ -315,7 +315,7 @@ impl Pacdef {
|
||||
}
|
||||
|
||||
fn get_assumed_group_file_names(arg_match: &ArgMatches) -> Result<Vec<PathBuf>> {
|
||||
let groups_dir = get_pacdef_group_dir()?;
|
||||
let groups_dir = get_group_dir()?;
|
||||
|
||||
let paths: Vec<_> = arg_match
|
||||
.get_many::<String>("groups")
|
||||
|
||||
@@ -33,7 +33,7 @@ pub use crate::config::Config;
|
||||
pub use crate::core::Pacdef;
|
||||
pub use crate::grouping::Group;
|
||||
pub(crate) use crate::grouping::Package;
|
||||
pub use crate::path::{get_config_path, get_pacdef_group_dir};
|
||||
pub use crate::path::{get_config_path, get_group_dir};
|
||||
pub use crate::search::NO_PACKAGES_FOUND;
|
||||
|
||||
extern crate pacdef_macros;
|
||||
|
||||
@@ -7,7 +7,7 @@ const CONFIG_FILE_NAME: &str = "pacdef.yaml";
|
||||
|
||||
/// Get the group directory where all group files are located. This is
|
||||
/// `$XDG_CONFIG_HOME/pacdef/groups`, which defaults to `$HOME/.config/pacdef/groups`.
|
||||
pub fn get_pacdef_group_dir() -> Result<PathBuf> {
|
||||
pub fn get_group_dir() -> Result<PathBuf> {
|
||||
let mut result = get_pacdef_base_dir().context("getting pacdef base dir")?;
|
||||
result.push("groups");
|
||||
Ok(result)
|
||||
|
||||
Reference in New Issue
Block a user