From a5e2ccb94fec76e59b1b08d11734a6e878781563 Mon Sep 17 00:00:00 2001 From: Mislav Bradac Date: Tue, 30 May 2017 16:26:16 +0200 Subject: [PATCH] Change working dir to dir of memgraph binary Reviewers: buda Reviewed By: buda Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D408 --- src/memgraph_bolt.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/memgraph_bolt.cpp b/src/memgraph_bolt.cpp index 30e5bc69a..a0f2cf5ce 100644 --- a/src/memgraph_bolt.cpp +++ b/src/memgraph_bolt.cpp @@ -1,4 +1,5 @@ #include +#include #include #include "gflags/gflags.h" @@ -21,6 +22,7 @@ #include "utils/stacktrace/log.hpp" #include "utils/terminate_handler.hpp" +namespace fs = std::experimental::filesystem; using endpoint_t = io::network::NetworkEndpoint; using socket_t = io::network::Socket; using session_t = communication::bolt::Session; @@ -43,6 +45,7 @@ void throw_and_stacktace(std::string message) { } int main(int argc, char **argv) { + fs::current_path(fs::path(argv[0]).parent_path()); gflags::ParseCommandLineFlags(&argc, &argv, true); // logging init #ifdef SYNC_LOGGER