This commit is contained in:
@@ -26,7 +26,7 @@ std::filesystem::path get_config_path() {
|
|||||||
std::vector<std::filesystem::path> config_paths = {
|
std::vector<std::filesystem::path> config_paths = {
|
||||||
"/data/sos_config.json",
|
"/data/sos_config.json",
|
||||||
_home / ".config/simple_object_storage/config.json",
|
_home / ".config/simple_object_storage/config.json",
|
||||||
_exe / ".." / ".test-docker" / "config.json"
|
_exe / ".." / ".test" / "config.json"
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const auto& path : config_paths) {
|
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 << "Starting server at " << config.host << ":" << config.port << std::endl;
|
||||||
std::cout << "Object store path: " << config.object_store_path << 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<Server>(config);
|
g_server = std::make_unique<Server>(config);
|
||||||
|
|
||||||
// Start server in a separate thread
|
// Start server in a separate thread
|
||||||
|
Reference in New Issue
Block a user