aboutsummaryrefslogtreecommitdiffstats
path: root/parameter/ParameterMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parameter/ParameterMgr.cpp')
-rw-r--r--parameter/ParameterMgr.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/parameter/ParameterMgr.cpp b/parameter/ParameterMgr.cpp
index fb09a7f..2e66c02 100644
--- a/parameter/ParameterMgr.cpp
+++ b/parameter/ParameterMgr.cpp
@@ -343,11 +343,13 @@ CParameterMgr::CParameterMgr(const string& strConfigurationFilePath) :
}
// Configuration file folder
- uint32_t uiSlashPos = _strXmlConfigurationFilePath.rfind('/', -1);
-
- assert(uiSlashPos != (uint32_t)-1);
-
- _strXmlConfigurationFolderPath = _strXmlConfigurationFilePath.substr(0, uiSlashPos);
+ std::string::size_type slashPos = _strXmlConfigurationFilePath.rfind('/', -1);
+ if(slashPos == std::string::npos) {
+ // Configuration folder is the current folder
+ _strXmlConfigurationFolderPath = '.';
+ } else {
+ _strXmlConfigurationFolderPath = _strXmlConfigurationFilePath.substr(0, slashPos);
+ }
// Schema absolute folder location
_strSchemaFolderLocation = _strXmlConfigurationFolderPath + "/" + gacSystemSchemasSubFolder;