From 3d1dca985f052551d406b291e7c7143027ee156f Mon Sep 17 00:00:00 2001
From: afederici <ajf5@illinois.edu>
Date: Wed, 18 Nov 2020 22:38:02 -0600
Subject: [PATCH] bug fix

---
 src/Node.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Node.cpp b/src/Node.cpp
index e0237f1..c35cd87 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;
-- 
GitLab