fix transfer
This commit is contained in:
@@ -44,17 +44,8 @@ namespace ui {
|
||||
if (std::get<0>(result)) {
|
||||
printf("path is %s\n", std::get<2>(result).c_str());
|
||||
std::string path = std::get<2>(result);
|
||||
std::vector<std::string> files;
|
||||
std::vector<char*> cstrings{};
|
||||
auto directory = std::filesystem::path(path);
|
||||
for (const auto & entry : std::filesystem::directory_iterator(path)) {
|
||||
std::cout << entry.path() << std::endl;
|
||||
files.push_back(entry.path().string());
|
||||
}
|
||||
for (auto& file : files) {
|
||||
cstrings.push_back(&file.front());
|
||||
}
|
||||
transfer_files(directory, cstrings.data(), cstrings.size());
|
||||
transfer_files(directory);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user