Logging bin path, hoping to crack that elusive segfault
This commit is contained in:
parent
cf13499158
commit
f4f9ffe883
|
@ -6,6 +6,7 @@
|
|||
#include <boost/uuid/uuid_io.hpp>
|
||||
#include "platformTools.h"
|
||||
#include <whereami.h>
|
||||
#include "logging.h"
|
||||
|
||||
using boost::filesystem::path;
|
||||
using std::string;
|
||||
|
@ -18,6 +19,7 @@ path getBinPath() {
|
|||
if (pathLength == -1) {
|
||||
throw std::runtime_error("Error determining path length.");
|
||||
}
|
||||
logging::debugFormat("Bin path has length {}.", pathLength);
|
||||
|
||||
// Get path
|
||||
// Note: According to documentation, pathLength does *not* include the trailing zero. Actually, it does.
|
||||
|
@ -30,6 +32,7 @@ path getBinPath() {
|
|||
|
||||
// Convert to boost::filesystem::path
|
||||
string pathString(buffer.data());
|
||||
logging::debugFormat("Bin path: '{}'", pathString);
|
||||
static path binPath(boost::filesystem::canonical(pathString).make_preferred());
|
||||
return binPath;
|
||||
} catch (...) {
|
||||
|
|
Loading…
Reference in New Issue