create directories for incoming transfers
This commit is contained in:
parent
3c25162ba1
commit
e28c2502d6
@ -1,5 +1,6 @@
|
|||||||
#include "./tox_transfer_manager.hpp"
|
#include "./tox_transfer_manager.hpp"
|
||||||
|
|
||||||
|
#include <filesystem>
|
||||||
#include <solanaceae/toxcore/tox_interface.hpp>
|
#include <solanaceae/toxcore/tox_interface.hpp>
|
||||||
|
|
||||||
#include <solanaceae/message3/file_r_file.hpp>
|
#include <solanaceae/message3/file_r_file.hpp>
|
||||||
@ -245,6 +246,8 @@ bool ToxTransferManager::setFilePathDir(Message3Handle transfer, std::string_vie
|
|||||||
full_file_path += "/";
|
full_file_path += "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::filesystem::create_directories(full_file_path);
|
||||||
|
|
||||||
// TODO: read file name(s) from comp
|
// TODO: read file name(s) from comp
|
||||||
if (transfer.all_of<Message::Components::Transfer::FileInfo>()) {
|
if (transfer.all_of<Message::Components::Transfer::FileInfo>()) {
|
||||||
const auto& file_info = transfer.get<Message::Components::Transfer::FileInfo>();
|
const auto& file_info = transfer.get<Message::Components::Transfer::FileInfo>();
|
||||||
|
Loading…
Reference in New Issue
Block a user