summaryrefslogtreecommitdiff
path: root/receiver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'receiver.cpp')
-rw-r--r--receiver.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/receiver.cpp b/receiver.cpp
index b691395..46ab71a 100644
--- a/receiver.cpp
+++ b/receiver.cpp
@@ -224,7 +224,7 @@ static void import_directory(const char *path, std::string dirname) {
224 if (entry->d_type != DT_REG || entry->d_namlen != FILENAME_LENGTH) 224 if (entry->d_type != DT_REG || entry->d_namlen != FILENAME_LENGTH)
225 continue; 225 continue;
226 226
227 std::string filename(entry->d_name, entry->d_name + entry->d_namlen); 227 std::string filename(entry->d_name);
228 uint64_t session_id; 228 uint64_t session_id;
229 uint8_t aeskey[AES_KEY_LENGTH]; 229 uint8_t aeskey[AES_KEY_LENGTH];
230 230
@@ -253,8 +253,8 @@ static void import_sessions(const char *root_dir) {
253 while ((entry = readdir(dirp)) != NULL) { 253 while ((entry = readdir(dirp)) != NULL) {
254 if (entry->d_type != DT_DIR || entry->d_namlen != DIRNAME_LENGTH) 254 if (entry->d_type != DT_DIR || entry->d_namlen != DIRNAME_LENGTH)
255 continue; 255 continue;
256 std::string dirname(entry->d_name, entry->d_name + entry->d_namlen); 256 std::string dirname(entry->d_name);
257 snprintf(dirpath, PATH_MAX, "%s/%*s", root_dir, DIRNAME_LENGTH, entry->d_name); 257 snprintf(dirpath, PATH_MAX, "%s/%s", root_dir, entry->d_name);
258 import_directory(dirpath, dirname); 258 import_directory(dirpath, dirname);
259 } 259 }
260 closedir(dirp); 260 closedir(dirp);