Fix FTBFS on Windows (oops!)

This commit is contained in:
Mike Gelfand 2017-05-01 19:07:35 +03:00
parent 14370e5353
commit 87220d44a5
1 changed files with 5 additions and 5 deletions

View File

@ -813,25 +813,25 @@ tr_sys_file_t tr_sys_file_open(char const* path, int flags, int permissions, tr_
native_access |= GENERIC_READ;
}
if ((flags & TR_SYS_FILE_WRITE)) != 0
if ((flags & TR_SYS_FILE_WRITE) != 0)
{
native_access |= GENERIC_WRITE;
}
if ((flags & TR_SYS_FILE_CREATE_NEW)) != 0
if ((flags & TR_SYS_FILE_CREATE_NEW) != 0)
{
native_disposition = CREATE_NEW;
}
else if ((flags & TR_SYS_FILE_CREATE)) != 0
else if ((flags & TR_SYS_FILE_CREATE) != 0)
{
native_disposition = (flags & TR_SYS_FILE_TRUNCATE) != 0 ? CREATE_ALWAYS : OPEN_ALWAYS;
}
else if ((flags & TR_SYS_FILE_TRUNCATE)) != 0
else if ((flags & TR_SYS_FILE_TRUNCATE) != 0)
{
native_disposition = TRUNCATE_EXISTING;
}
if ((flags & TR_SYS_FILE_SEQUENTIAL)) != 0
if ((flags & TR_SYS_FILE_SEQUENTIAL) != 0)
{
native_flags |= FILE_FLAG_SEQUENTIAL_SCAN;
}