Skip to content
Snippets Groups Projects
Commit 6f3b7f0f authored by Israel Barreto Sant'Anna's avatar Israel Barreto Sant'Anna Committed by Vytor Calixto
Browse files

Fixed server ls

parent 956a5e63
No related branches found
No related tags found
1 merge request!1Lento
......@@ -69,7 +69,7 @@ int Protocol::setData(vector<BYTE> data, int type){
msg.data = subvector;
if(size < MINSIZE){
BYTE zero = 0x00;
msg.data.insert(msg.data.begin(), MINSIZE-size, zero);
msg.data.insert(msg.data.end(), MINSIZE-size, zero);
size = MINSIZE;
}
msg.size = bitset<SIZE_S>(size);
......
......@@ -16,6 +16,7 @@ void cd(string path){
string ls(string args){
string output;
args += " 2>&1";
FILE *lsOut = popen(args.c_str(), "r");
if(!lsOut){
throw "Couldn't execute ls";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment