From f1f3f7d9481079af952ca020d96d20c02ac68b62 Mon Sep 17 00:00:00 2001 From: Roland Olbricht Date: Sat, 22 Oct 2022 15:15:23 +0200 Subject: [PATCH] Enforce slash at the end of db dir --- src/template_db/dispatcher_client.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/template_db/dispatcher_client.cc b/src/template_db/dispatcher_client.cc index 622d66a70..fd6428f33 100644 --- a/src/template_db/dispatcher_client.cc +++ b/src/template_db/dispatcher_client.cc @@ -72,6 +72,9 @@ Dispatcher_Client::Dispatcher_Client(const std::string& dispatcher_share_name_) shadow_name = db_dir + (dispatcher_share_name.size() >= 8 && dispatcher_share_name.substr(dispatcher_share_name.size()-8) == "osm_base" ? "/osm_base_shadow" : "/areas_shadow"); + + if (!db_dir.empty() && db_dir.back() != '/') + db_dir += '/'; // initialize the socket for the client socket.open(db_dir + dispatcher_share_name_);