diff --git a/src/main.cpp b/src/main.cpp index 59102ec..bc3f1ea 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,7 +26,7 @@ std::filesystem::path get_config_path() { std::vector config_paths = { "/data/sos_config.json", _home / ".config/simple_object_storage/config.json", - _exe / ".." / ".test-docker" / "config.json" + _exe / ".." / ".test" / "config.json" }; for (const auto& path : config_paths) { @@ -57,6 +57,11 @@ bool initialize_server() { std::cout << "Starting server at " << config.host << ":" << config.port << std::endl; std::cout << "Object store path: " << config.object_store_path << std::endl; + if (!std::filesystem::exists(config.object_store_path)) { + std::cout << "Object store path does not exist: " << config.object_store_path << std::endl; + return false; + } + g_server = std::make_unique(config); // Start server in a separate thread