Added Env class.

This commit is contained in:
XMRig 2019-12-22 18:09:26 +07:00
parent bdf12bca0f
commit 356e666e61
No known key found for this signature in database
GPG key ID: 446A53638BE94409
6 changed files with 164 additions and 10 deletions

View file

@ -25,6 +25,7 @@
#include "base/io/log/backends/FileLog.h"
#include "base/kernel/Env.h"
#include <cassert>
@ -35,7 +36,7 @@
xmrig::FileLog::FileLog(const char *fileName)
{
uv_fs_t req;
m_file = uv_fs_open(uv_default_loop(), &req, fileName, O_CREAT | O_APPEND | O_WRONLY, 0644, nullptr);
m_file = uv_fs_open(uv_default_loop(), &req, Env::expand(fileName), O_CREAT | O_APPEND | O_WRONLY, 0644, nullptr);
uv_fs_req_cleanup(&req);
}