diff options
author | Tor Egge <Tor.Egge@online.no> | 2023-07-21 10:26:58 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2023-07-21 10:26:58 +0200 |
commit | a0a6e0137cc3741160a2d4d12905d65fac927cb0 (patch) | |
tree | 7dd49f685d04f92844cb65dae5cb9ce9bab32a25 /searchcore | |
parent | 535a452f4a968a73a1f3c1e6a18a1edb2d4ff2c2 (diff) |
Use std::filesystem::current_path
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/proton.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp index d70bff52ed4..abeddb94a62 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp @@ -329,16 +329,15 @@ Proton::init(const BootstrapConfig::SP & configSnapshot) break; } _protonDiskLayout = std::make_unique<ProtonDiskLayout>(_transport, protonConfig.basedir, protonConfig.tlsspec); - vespalib::chdir(protonConfig.basedir); + std::filesystem::current_path(std::filesystem::path(protonConfig.basedir)); vespalib::alloc::MmapFileAllocatorFactory::instance().setup(protonConfig.basedir + "/swapdirs"); _tls->start(_transport, hwInfo.cpu().cores()); _flushEngine = std::make_unique<FlushEngine>(std::make_shared<flushengine::TlsStatsFactory>(_tls->getTransLogServer()), strategy, flush.maxconcurrent, vespalib::from_s(flush.idleinterval)); _metricsEngine->addExternalMetrics(_summaryEngine->getMetrics()); - char tmp[1024]; LOG(debug, "Start proton server with root at %s and cwd at %s", - protonConfig.basedir.c_str(), getcwd(tmp, sizeof(tmp))); + protonConfig.basedir.c_str(), std::filesystem::current_path().string().c_str()); _persistenceEngine = std::make_unique<PersistenceEngine>(*this, _diskMemUsageSampler->writeFilter(), _diskMemUsageSampler->notifier(), |