From 55596742088d1156513ee52175d589f0bfd91096 Mon Sep 17 00:00:00 2001 From: Patrick LeBlanc Date: Thu, 15 Nov 2018 16:50:45 -0600 Subject: [PATCH] MCOL-1558. Got it working. Fixed a couple off-by-one type errors constructing the new paths. --- procmon/processmonitor.cpp | 2 +- versioning/BRM/save_brm.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/procmon/processmonitor.cpp b/procmon/processmonitor.cpp index b9ba25193..9a8f4b8cd 100644 --- a/procmon/processmonitor.cpp +++ b/procmon/processmonitor.cpp @@ -2586,7 +2586,7 @@ pid_t ProcessMonitor::startProcess(string processModuleType, string processName, if (line[0] == '/') // handle absolute paths (saved by an old version) dbrmFile = line; else - dbrmFile = DBRMroot + line; + dbrmFile = DBRMroot.substr(0, DBRMroot.find_last_of('/') + 1) + line; // if ( !gOAMParentModuleFlag ) { diff --git a/versioning/BRM/save_brm.cpp b/versioning/BRM/save_brm.cpp index b3d33168c..d53507082 100644 --- a/versioning/BRM/save_brm.cpp +++ b/versioning/BRM/save_brm.cpp @@ -101,7 +101,7 @@ int main (int argc, char** argv) prefix += '\n'; #endif // for MCOL-1558. Make the _current file relative to DBRMRoot - string relative = prefix.substr(prefix.find_last_of('/')); + string relative = prefix.substr(prefix.find_last_of('/') + 1); currentFile->write(relative.c_str(), relative.length()); } catch (exception& e)