mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
log: ensure the log/
directory exists (#2904)
This commit is contained in:
parent
a0da98a367
commit
2c669b7f5a
|
@ -128,6 +128,7 @@ void set_file(const std::string& filename,
|
||||||
} else {
|
} else {
|
||||||
file_path = file_util::get_file_path({"log", filename});
|
file_path = file_util::get_file_path({"log", filename});
|
||||||
}
|
}
|
||||||
|
file_util::create_dir_if_needed_for_file(file_path);
|
||||||
std::string complete_filename = file_path;
|
std::string complete_filename = file_path;
|
||||||
if (should_rotate) {
|
if (should_rotate) {
|
||||||
complete_filename += "." + str_util::current_local_timestamp_no_colons() + ".log";
|
complete_filename += "." + str_util::current_local_timestamp_no_colons() + ".log";
|
||||||
|
|
Loading…
Reference in a new issue