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
14556047
Commit
14556047
authored
Oct 20, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Fix last error code in GetVolumeInformationW when an explicit subdir is requested.
parent
357b5060
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
volume.c
dlls/kernel32/tests/volume.c
+1
-1
volume.c
dlls/kernel32/volume.c
+7
-1
No files found.
dlls/kernel32/tests/volume.c
View file @
14556047
...
...
@@ -435,7 +435,7 @@ static void test_GetVolumeInformationA(void)
SetLastError
(
0xdeadbeef
);
ret
=
pGetVolumeInformationA
(
windowsdir
,
vol_name_buf
,
vol_name_size
,
&
vol_serial_num
,
&
max_comp_len
,
&
fs_flags
,
fs_name_buf
,
fs_name_len
);
todo_wine
ok
(
!
ret
&&
(
GetLastError
()
==
ERROR_DIR_NOT_ROOT
||
ok
(
!
ret
&&
(
GetLastError
()
==
ERROR_DIR_NOT_ROOT
||
broken
(
GetLastError
()
==
ERROR_BAD_PATHNAME
/* win9x */
)),
"GetVolumeInformationA did%s fail, root=%s, last error=%u
\n
"
,
ret
?
" not"
:
""
,
windowsdir
,
GetLastError
());
/* A subdir with trailing \ yields DIR_NOT_ROOT instead of INVALID_NAME */
...
...
dlls/kernel32/volume.c
View file @
14556047
...
...
@@ -568,7 +568,13 @@ BOOL WINAPI GetVolumeInformationW( LPCWSTR root, LPWSTR label, DWORD label_len,
p
=
memchrW
(
nt_name
.
Buffer
+
4
,
'\\'
,
(
nt_name
.
Length
-
4
)
/
sizeof
(
WCHAR
)
);
if
(
p
!=
nt_name
.
Buffer
+
nt_name
.
Length
/
sizeof
(
WCHAR
)
-
1
)
{
SetLastError
(
ERROR_INVALID_NAME
);
/* check if root contains an explicit subdir */
if
(
root
[
0
]
&&
root
[
1
]
==
':'
)
root
+=
2
;
while
(
*
root
==
'\\'
)
root
++
;
if
(
strchrW
(
root
,
'\\'
))
SetLastError
(
ERROR_DIR_NOT_ROOT
);
else
SetLastError
(
ERROR_INVALID_NAME
);
goto
done
;
}
...
...
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