diff --git a/components/detournavigator/navigator.cpp b/components/detournavigator/navigator.cpp index a77703a559..30f64aeacd 100644 --- a/components/detournavigator/navigator.cpp +++ b/components/detournavigator/navigator.cpp @@ -15,10 +15,11 @@ namespace DetourNavigator std::unique_ptr db; if (settings.mEnableNavMeshDiskCache) { + const std::string path = Files::pathToUnicodeString(userDataPath / "navmesh.db"); + Log(Debug::Info) << "Using " << path << " to store navigation mesh cache"; try { - db = std::make_unique( - Files::pathToUnicodeString(userDataPath / "navmesh.db"), settings.mMaxDbFileSize); + db = std::make_unique(path, settings.mMaxDbFileSize); } catch (const std::exception& e) {