Skip to content

Commit

Permalink
Enforce slash at the end of db dir
Browse files Browse the repository at this point in the history
  • Loading branch information
drolbr committed Oct 22, 2022
1 parent 0eba96d commit f1f3f7d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/template_db/dispatcher_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_);
Expand Down

0 comments on commit f1f3f7d

Please sign in to comment.