added auto-creation of extensions directory when not present

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6700 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-09-06 22:04:47 +00:00
parent 3d0d047d14
commit eee6e0400c

View File

@ -2143,7 +2143,12 @@ int RsServer::StartupRetroShare()
#ifndef WINDOWS_SYS #ifndef WINDOWS_SYS
plugins_directories.push_back(std::string("/usr/lib/retroshare/extensions/")) ; plugins_directories.push_back(std::string("/usr/lib/retroshare/extensions/")) ;
#endif #endif
plugins_directories.push_back(RsInitConfig::basedir + "/extensions/") ; std::string extensions_dir = RsInitConfig::basedir + "/extensions/" ;
plugins_directories.push_back(extensions_dir) ;
if(!RsDirUtil::checkCreateDirectory(extensions_dir))
std::cerr << "(EE) Cannot create extensions directory " + extensions_dir + ". This is not mandatory, but you probably have a permission problem." << std::endl;
#ifdef DEBUG_PLUGIN_SYSTEM #ifdef DEBUG_PLUGIN_SYSTEM
plugins_directories.push_back(".") ; // this list should be saved/set to some correct value. plugins_directories.push_back(".") ; // this list should be saved/set to some correct value.
// possible entries include: /usr/lib/retroshare, ~/.retroshare/extensions/, etc. // possible entries include: /usr/lib/retroshare, ~/.retroshare/extensions/, etc.