Skip to content

Commit

Permalink
fix type error in get_temp_directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jere8184 committed Nov 20, 2024
1 parent 4f0de63 commit 82a7fc6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libopenage/util/fslike/directory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,9 @@ std::ostream &Directory::repr(std::ostream &stream) {
return stream;
}

Directory Directory::get_temp_directory() {
std::string temp_dir_path = std::filesystem::temp_directory_path() / std::tmpnam(nullptr);
static Directory get_temp_directory() {
std::filesystem::path path = std::filesystem::temp_directory_path() / std::tmpnam(nullptr);
std::string temp_dir_path = path.string();
bool create = true;
Directory directory = Directory(temp_dir_path, create);
return directory;
Expand Down

0 comments on commit 82a7fc6

Please sign in to comment.