mirror of
https://github.com/ModOrganizer2/mob.git
synced 2026-07-27 14:07:05 -07:00
make sure directory exists when creating log file
This commit is contained in:
@@ -185,7 +185,11 @@ bool context::enabled(level lv)
|
||||
|
||||
void context::set_log_file(const fs::path& p)
|
||||
{
|
||||
if (!p.empty())
|
||||
// creating directory
|
||||
if (!exists(p.parent_path()))
|
||||
op::create_directories(gcx(), paths::prefix());
|
||||
|
||||
if (!conf::dry() && !p.empty())
|
||||
{
|
||||
HANDLE h = CreateFileW(
|
||||
p.native().c_str(), GENERIC_WRITE, FILE_SHARE_READ,
|
||||
|
||||
Reference in New Issue
Block a user