no parent dir fix
This commit is contained in:
parent
700d6d96ac
commit
722c085817
1 changed files with 3 additions and 1 deletions
|
|
@ -15,7 +15,9 @@ FileWriter::FileWriter(const std::string& filename, size_t buffer_size)
|
||||||
{
|
{
|
||||||
std::filesystem::path file_path(filename);
|
std::filesystem::path file_path(filename);
|
||||||
std::filesystem::path dir_path = file_path.parent_path();
|
std::filesystem::path dir_path = file_path.parent_path();
|
||||||
std::filesystem::create_directories(dir_path);
|
if (dir_path != "") {
|
||||||
|
std::filesystem::create_directories(dir_path);
|
||||||
|
}
|
||||||
stream_.open(filename);
|
stream_.open(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue