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
43c5fe11
Commit
43c5fe11
authored
Mar 11, 2018
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Fix permission check.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
43c71d99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
profile.c
dlls/kernel32/tests/profile.c
+6
-3
No files found.
dlls/kernel32/tests/profile.c
View file @
43c5fe11
...
...
@@ -956,6 +956,7 @@ static void test_WritePrivateProfileString(void)
LPCSTR
data
;
CHAR
path
[
MAX_PATH
];
CHAR
temp
[
MAX_PATH
];
HANDLE
file
;
SetLastError
(
0xdeadbeef
);
ret
=
WritePrivateProfileStringW
(
NULL
,
NULL
,
NULL
,
NULL
);
...
...
@@ -1069,12 +1070,14 @@ static void test_WritePrivateProfileString(void)
"Expected ERROR_ACCESS_DENIED, got %d
\n
"
,
GetLastError
());
/* Relative paths are relative to X:\\%WINDIR% */
GetWindowsDirectoryA
(
temp
,
MAX_PATH
);
GetTempFileNameA
(
temp
,
"win"
,
1
,
path
);
if
(
GetFileAttributesA
(
path
)
==
INVALID_FILE_ATTRIBUTES
)
GetWindowsDirectoryA
(
path
,
MAX_PATH
);
strcat
(
path
,
"
\\
win1.tmp"
);
file
=
CreateFileA
(
path
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
!
ret
&&
GetLastError
()
==
ERROR_ACCESS_DENIED
)
skip
(
"Not allowed to create a file in the Windows directory
\n
"
);
else
{
CloseHandle
(
file
);
DeleteFileA
(
path
);
data
=
"[App]
\r\n
"
...
...
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