Fix config path.
This commit is contained in:
@@ -11,11 +11,11 @@ namespace dropshell {
|
||||
|
||||
|
||||
namespace localfile {
|
||||
std::string dropshell_conf() {
|
||||
// Try ~/.config/dropshell/dropshell.conf
|
||||
std::string dropshell_env() {
|
||||
// Try ~/.config/dropshell/dropshell.env
|
||||
const char* home = std::getenv("HOME");
|
||||
if (home) {
|
||||
fs::path user_path = fs::path(home) / ".config" / "dropshell" / "dropshell.conf";
|
||||
fs::path user_path = fs::path(home) / ".config" / "dropshell" / "dropshell.env";
|
||||
return user_path.string();
|
||||
}
|
||||
std::cerr << "Warning: Couldn't determine user directory" << std::endl;
|
||||
|
@@ -28,7 +28,7 @@ namespace dropshell {
|
||||
// | |-- service_name.hash.env
|
||||
namespace localfile {
|
||||
// ~/.config/dropshell/dropshell.conf
|
||||
std::string dropshell_conf();
|
||||
std::string dropshell_env();
|
||||
std::string server_env(const std::string &server_name);
|
||||
std::string service_env(const std::string &server_name, const std::string &service_name);
|
||||
std::string service_hash(const std::string &server_name, const std::string &service_name);
|
||||
|
Reference in New Issue
Block a user