(main,mobility_check,upda,turn,rea,mobupdate,ef_open,logerror,
emp_config,gamedown,show_motd,match_user,typed_wu, delete_old_announcements) [_WIN32]: switch the default file mode to binary to match POSIX. Remove the now unneccessary ifdef for the open/fopen. Add text mode for user files (econfig/auth).
This commit is contained in:
parent
f6e78f4589
commit
1a8488bc45
13 changed files with 14 additions and 65 deletions
|
@ -95,11 +95,7 @@ turn(void)
|
|||
pr("Writing empty no-login message.\n");
|
||||
}
|
||||
|
||||
#if !defined(_WIN32)
|
||||
fd = open(msgfilepath, O_RDWR | O_CREAT | O_TRUNC, 0660);
|
||||
#else
|
||||
fd = open(msgfilepath, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0660);
|
||||
#endif
|
||||
if (fd == -1) {
|
||||
pr("Something went wrong opening the message file.\n");
|
||||
logerror("Could not open message file (%s).\n", msgfilepath);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue