Changeset 6417 for code/trunk/src/libraries/core/PathConfig.cc
- Timestamp:
- Dec 25, 2009, 10:23:58 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/PathConfig.cc
r6105 r6417 226 226 if (!CommandLineParser::getArgument("writingPathSuffix")->hasDefaultValue()) 227 227 { 228 std::stringdirectory(CommandLineParser::getValue("writingPathSuffix").getString());228 const std::string& directory(CommandLineParser::getValue("writingPathSuffix").getString()); 229 229 configPath_ = configPath_ / directory; 230 230 logPath_ = logPath_ / directory; … … 256 256 257 257 // We search for helper files with the following extension 258 std::stringmoduleextension = specialConfig::moduleExtension;258 const std::string& moduleextension = specialConfig::moduleExtension; 259 259 size_t moduleextensionlength = moduleextension.size(); 260 260 261 261 // Add that path to the PATH variable in case a module depends on another one 262 std::string pathVariable = getenv("PATH");263 putenv(const_cast<char*>(("PATH=" + pathVariable + ";"+ modulePath_.string()).c_str()));262 std::string pathVariable(getenv("PATH")); 263 putenv(const_cast<char*>(("PATH=" + pathVariable + ';' + modulePath_.string()).c_str())); 264 264 265 265 // Make sure the path exists, otherwise don't load modules … … 273 273 while (file != end) 274 274 { 275 std::stringfilename = file->BOOST_LEAF_FUNCTION();275 const std::string& filename = file->BOOST_LEAF_FUNCTION(); 276 276 277 277 // Check if the file ends with the exension in question … … 281 281 { 282 282 // We've found a helper file 283 std::stringlibrary = filename.substr(0, filename.size() - moduleextensionlength);283 const std::string& library = filename.substr(0, filename.size() - moduleextensionlength); 284 284 modulePaths.push_back((modulePath_ / library).file_string()); 285 285 }
Note: See TracChangeset
for help on using the changeset viewer.