Fix config path.

This commit is contained in:
Your Name
2025-04-28 21:14:46 +12:00
parent 76efe77e85
commit e258726829
4 changed files with 8 additions and 8 deletions

View File

@@ -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;

View File

@@ -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);