Skip to content

Commit

Permalink
Move the mk*temp path results
Browse files Browse the repository at this point in the history
  • Loading branch information
bugdea1er committed Jan 28, 2024
1 parent 103ced0 commit 125c7a6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/tmp/path.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ class path {
template<typename C>
explicit path(std::string_view prefix, C constructor) {
const auto parent = std::filesystem::temp_directory_path() / prefix;
std::string arg = parent / "XXXXXX";

std::filesystem::create_directories(parent);

std::string arg = parent / "XXXXXX";
constructor(arg.data());
this->underlying = arg;

this->underlying = std::move(arg);
}

private:
Expand Down

0 comments on commit 125c7a6

Please sign in to comment.