mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-11 13:24:40 +00:00
Fixed config file permissions after write (MSYS only).
This commit is contained in:
parent
365667ee0a
commit
ed11c0a6da
1 changed files with 2 additions and 1 deletions
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
|
# include <sys/stat.h>
|
||||||
# include <ext/stdio_filebuf.h>
|
# include <ext/stdio_filebuf.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -102,7 +103,7 @@ bool xmrig::Json::save(const char *fileName, const rapidjson::Document &doc)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
# elif defined(__GNUC__)
|
# elif defined(__GNUC__)
|
||||||
const int fd = _wopen(toUtf16(fileName).c_str(), _O_WRONLY | _O_BINARY | _O_CREAT | _O_TRUNC);
|
const int fd = _wopen(toUtf16(fileName).c_str(), _O_WRONLY | _O_BINARY | _O_CREAT | _O_TRUNC, _S_IWRITE);
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue