tidying
This commit is contained in:
@ -11,18 +11,26 @@ namespace dropshell {
|
||||
|
||||
|
||||
|
||||
std::string get_local_dropshell_config_path()
|
||||
std::string get_local_dropshell_config_parent_path()
|
||||
{
|
||||
// Try ~/.config/dropshell/dropshell.conf
|
||||
const char* home = std::getenv("HOME");
|
||||
if (home) {
|
||||
fs::path user_path = fs::path(home) / ".config" / "dropshell" / "dropshell.env";
|
||||
fs::path user_path = fs::path(home) / ".config" / "dropshell";
|
||||
return user_path.string();
|
||||
}
|
||||
std::cerr << "Warning: Couldn't determine user directory" << std::endl;
|
||||
return std::string();
|
||||
}
|
||||
|
||||
std::string get_local_dropshell_config_file()
|
||||
{
|
||||
std::string parent_path = get_local_dropshell_config_parent_path();
|
||||
if (parent_path.empty())
|
||||
return std::string();
|
||||
return parent_path + "/dropshell.conf";
|
||||
}
|
||||
|
||||
std::string get_local_system_templates_path()
|
||||
{
|
||||
return "/opt/dropshell/templates";
|
||||
|
Reference in New Issue
Block a user