Fix log file permissions on Linux

install-platforms
Lukas Werling 2017-11-08 20:21:25 +01:00
parent 587f5b5f0e
commit 739de3f6c8
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ bool OpenLog()
while (!(C4LogFile = _fsopen(Config.AtUserDataPath(sLogFileName.getData()), "wt", _SH_DENYWR)))
#elif defined(HAVE_SYS_FILE_H)
int fd = 0;
while (!(fd = open(Config.AtUserDataPath(sLogFileName.getData()), O_WRONLY | O_CREAT)) || flock(fd, LOCK_EX|LOCK_NB))
while (!(fd = open(Config.AtUserDataPath(sLogFileName.getData()), O_WRONLY | O_CREAT, 0644)) || flock(fd, LOCK_EX|LOCK_NB))
#else
while (!(C4LogFile = fopen(Config.AtUserDataPath(sLogFileName.getData()), "wb")))
#endif