fix creating empty directory (empty path)
This commit is contained in:
parent
f904b321bc
commit
0404ed84fc
@ -241,7 +241,9 @@ bool ToxTransferManager::setFilePath(Message3Handle transfer, std::string_view f
|
|||||||
|
|
||||||
uint64_t file_size {0};
|
uint64_t file_size {0};
|
||||||
std::filesystem::path full_file_path{file_path};
|
std::filesystem::path full_file_path{file_path};
|
||||||
std::filesystem::create_directories(full_file_path.parent_path());
|
if (auto parent_path = full_file_path.parent_path(); !parent_path.empty()) {
|
||||||
|
std::filesystem::create_directories(parent_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>()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user