Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
00a02472
Commit
00a02472
authored
Nov 26, 2020
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Don't write Unicode BOM if file is not empty in _wsopen_dispatch.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b485d582
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
file.c
dlls/msvcrt/file.c
+6
-1
No files found.
dlls/msvcrt/file.c
View file @
00a02472
...
...
@@ -2297,9 +2297,14 @@ int CDECL MSVCRT__wsopen_dispatch( const MSVCRT_wchar_t* path, int oflags, int s
if
(
oflags
&
(
MSVCRT__O_WTEXT
|
MSVCRT__O_U16TEXT
|
MSVCRT__O_U8TEXT
))
{
LARGE_INTEGER
size
=
{{
0
}};
if
((
access
&
GENERIC_WRITE
)
&&
(
creation
==
OPEN_EXISTING
||
creation
==
OPEN_ALWAYS
))
GetFileSizeEx
(
hand
,
&
size
);
if
((
access
&
GENERIC_WRITE
)
&&
(
creation
==
CREATE_NEW
||
creation
==
CREATE_ALWAYS
||
creation
==
TRUNCATE_EXISTING
||
(
creation
==
OPEN_ALWAYS
&&
GetLastError
()
==
ERROR_ALREADY_EXISTS
)))
||
(
(
creation
==
OPEN_EXISTING
||
creation
==
OPEN_ALWAYS
)
&&
!
size
.
QuadPart
)))
{
if
(
oflags
&
MSVCRT__O_U8TEXT
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment