This commit is contained in:
Your Name
2025-05-03 19:56:20 +12:00
parent aafcc4cafe
commit 6c03512637
6 changed files with 32 additions and 39 deletions

View File

@@ -79,14 +79,12 @@ bool Server::validate_write_request(const httplib::Request &req, httplib::Respon
Server::Server(const ServerConfig& config)
: config_(config), running_(false) {
// Ensure object store directory exists
try {
std::filesystem::create_directories(config_.object_store_path);
} catch (const std::filesystem::filesystem_error& e) {
std::cerr << "Failed to create object store directory: " << config_.object_store_path << " - " << e.what() << std::endl;
if (!std::filesystem::exists(config_.object_store_path)) {
std::cerr << "Object store directory does not exist: " << config_.object_store_path << std::endl;
return;
}
// Initialize the database
if (!init_db()) {
// Error already printed in init_db