Skip to content
Snippets Groups Projects
Commit 3d1dca98 authored by ajf5's avatar ajf5
Browse files

bug fix

parent 55e231ec
No related branches found
No related tags found
No related merge requests found
......@@ -911,10 +911,10 @@ void Node::handleTcpMessage()
int matchLen = match.size();
struct dirent *entry = nullptr;
DIR *dp = nullptr;
if ((dp = opendir(".")) == nullptr) { cout << "tmp directory error " << sdfsPre << endl; break; }
if ((dp = opendir(".")) == nullptr) { cout << "tmp directory error " << match << endl; break; }
while ((entry = readdir(dp))){
//cout << "[FILES] found " << entry->d_name << " looking to match " << to_string(matchLen) << " chars from " << sdfsPre << endl;
if (strncmp(entry->d_name, sdfsPre.c_str(), matchLen) == 0){
cout << "[FILES] found " << entry->d_name << " looking to match " << to_string(matchLen) << " chars from " << match << endl;
if (strncmp(entry->d_name, match.c_str(), matchLen) == 0){
string searcher(entry->d_name);
string target = searcher.substr(4);
cout << "[CHUNKACK] found " << entry->d_name << endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment