Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
1bc72fb6
Commit
1bc72fb6
authored
Aug 22, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cabinet: Use the correct create disposition in fdi_open.
parent
d5ff7282
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
cabinet_main.c
dlls/cabinet/cabinet_main.c
+11
-4
No files found.
dlls/cabinet/cabinet_main.c
View file @
1bc72fb6
...
...
@@ -84,7 +84,7 @@ static INT_PTR fdi_open(char *pszFile, int oflag, int pmode)
HANDLE
handle
;
DWORD
dwAccess
=
0
;
DWORD
dwShareMode
=
0
;
DWORD
dwCreateDisposition
=
OPEN_EXISTING
;
DWORD
dwCreateDisposition
;
switch
(
oflag
&
_O_ACCMODE
)
{
...
...
@@ -102,10 +102,17 @@ static INT_PTR fdi_open(char *pszFile, int oflag, int pmode)
break
;
}
if
(
GetFileAttributesA
(
pszFile
)
!=
INVALID_FILE_ATTRIBUTES
)
dwCreateDisposition
=
OPEN_EXISTING
;
if
(
oflag
&
_O_CREAT
)
{
dwCreateDisposition
=
OPEN_ALWAYS
;
if
(
oflag
&
_O_EXCL
)
dwCreateDisposition
=
CREATE_NEW
;
else
if
(
oflag
&
_O_TRUNC
)
dwCreateDisposition
=
CREATE_ALWAYS
;
}
else
dwCreateDisposition
=
CREATE_NEW
;
{
dwCreateDisposition
=
OPEN_EXISTING
;
if
(
oflag
&
_O_TRUNC
)
dwCreateDisposition
=
TRUNCATE_EXISTING
;
}
handle
=
CreateFileA
(
pszFile
,
dwAccess
,
dwShareMode
,
NULL
,
dwCreateDisposition
,
0
,
NULL
);
...
...
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