diff --git a/src/Node.cpp b/src/Node.cpp index e0237f1d4a11a5bb69c10b738704500d1bf9cf8b..c35cd87e7e494eb517174358c816c54db29867e2 100644 --- a/src/Node.cpp +++ b/src/Node.cpp @@ -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;