Merge branch 'cmdconsole' into luamerage

This commit is contained in:
chuanweizhang2013 2014-03-16 10:06:46 +08:00
commit 1cf064a7d7
3 changed files with 6 additions and 5 deletions

View File

@ -252,6 +252,8 @@ Console::Console()
, _running(false)
, _endThread(false)
, _sendDebugStrings(false)
,_file_uploading(false)
,_upload_file_size(0)
{
// VS2012 doesn't support initializer list, so we create a new array and assign its elements to '_command'.
Command commands[] = {
@ -290,6 +292,7 @@ Console::Console()
{
_commands.insert ( std::pair<std::string,Command>(commands[i].name,commands[i]) );
}
_writablePath = FileUtils::getInstance()->getWritablePath();
}
Console::~Console()
@ -853,10 +856,7 @@ ssize_t Console::readfile(int fd, std::string& file_name, int file_size)
ssize_t n, rc;
char c;
auto sharedFileUtils = FileUtils::getInstance();
std::string writablePath = sharedFileUtils->getWritablePath();
std::string fileName = writablePath+file_name;
std::string fileName = _writablePath+file_name;
FILE* fp = fopen(fileName.c_str(), "wb");
if(!fp)

View File

@ -131,6 +131,7 @@ protected:
bool _file_uploading;
ssize_t _upload_file_size;
std::string _upload_file_name;
std::string _writablePath;
std::map<std::string, Command> _commands;

@ -1 +1 @@
Subproject commit 67d0fd2ed79e5f7d52b797af897bf5cc23ef7994
Subproject commit e06b610aa7bb1b5357f0700f1370ea64f9cb4b83