Tidying
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled

This commit is contained in:
Your Name
2025-05-21 20:51:05 +12:00
parent 9063edb45f
commit 270d6ef792
10 changed files with 551 additions and 504 deletions

View File

@ -102,7 +102,7 @@ namespace dropshell
}
// Create backups directory locally if it doesn't exist
std::string local_backups_dir = gConfig().get_local_backup_path();
std::string local_backups_dir = localpath::backups();
if (local_backups_dir.empty())
{
error << "Error: Local backups directory not found" << std::endl;

View File

@ -238,20 +238,7 @@ namespace dropshell
{
maketitle("Installing dropshell agent on this computer...");
std::vector<std::filesystem::path> paths = {
gConfig().get_local_template_cache_path(),
gConfig().get_local_backup_path(),
gConfig().get_local_tempfiles_path(),
localpath::agent()};
for (auto &p : gConfig().get_local_server_definition_paths())
paths.push_back(p);
for (auto &p : paths)
if (!std::filesystem::exists(p))
{
info << "Creating directory: " << p << std::endl;
std::filesystem::create_directories(p);
}
localpath::create_directories();
// create the agent-local directory.
recreate_agent_local::recreate_tree(localpath::agent());

View File

@ -57,7 +57,7 @@ namespace dropshell
std::vector<shared_commands::cBackupFileName> get_backup_files(const std::string &server, const std::string &match_service = "", const std::string &match_template_name = "")
{
std::string local_backups_dir = gConfig().get_local_backup_path();
std::string local_backups_dir = localpath::backups();
if (local_backups_dir.empty() || !std::filesystem::exists(local_backups_dir))
{
error << "Error: Local backups directory not found: " << local_backups_dir << std::endl;
@ -137,7 +137,7 @@ namespace dropshell
debug << " Server: " << server << std::endl;
debug << " Service: " << service << std::endl;
std::string local_backups_dir = gConfig().get_local_backup_path();
std::string local_backups_dir = localpath::backups();
if (local_backups_dir.empty() || !std::filesystem::exists(local_backups_dir))
{
error << "Error: Local backups directory not found: " << local_backups_dir << std::endl;