Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jere8184 committed Nov 19, 2024
1 parent 1085ff3 commit e2393a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libopenage/util/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static File get_temp_file() {
std::string file_name = std::tmpnam(nullptr);
std::ostringstream dir_path;
temp_dir.repr(dir_path);
mode_t mode = 0777;
File::mode_t mode = File::mode_t::RW;
File file_wrapper = File(dir_path.str() + file_name, mode);
return file_wrapper;
}
Expand Down
3 changes: 2 additions & 1 deletion libopenage/util/fslike/directory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ std::ostream &Directory::repr(std::ostream &stream) {
}

static Directory get_temp_directory() {
std::string temp_dir_path = std::filesystem::temp_directory_path() / std::tmpnam(nullptr);
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 e2393a8

Please sign in to comment.