fix for log files.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3889 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
0f31d3d7e8
commit
4dba0e3f28
1 changed files with 2 additions and 2 deletions
|
@ -115,7 +115,7 @@ vfsfile_t *VFSW32_Open(const char *osname, const char *mode)
|
|||
if (strchr(mode, '+'))
|
||||
read = write = true;
|
||||
|
||||
if (write && read)
|
||||
if ((write && read) || append)
|
||||
h = CreateFileA(osname, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_DELETE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
else if (write)
|
||||
h = CreateFileA(osname, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
|
@ -134,7 +134,7 @@ vfsfile_t *VFSW32_Open(const char *osname, const char *mode)
|
|||
|
||||
/*if appending, set the access position to the end of the file*/
|
||||
if (append)
|
||||
SetFilePointer(h, GetFileSize(h, NULL), NULL, FILE_BEGIN);
|
||||
SetFilePointer(h, 0, NULL, FILE_END);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue