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
fe64e21e
Commit
fe64e21e
authored
Aug 18, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Don't call from A to W function in Get/SetCurrentDirectory.
parent
e3e12845
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
path.c
dlls/kernel32/path.c
+10
-10
No files found.
dlls/kernel32/path.c
View file @
fe64e21e
...
...
@@ -1502,10 +1502,9 @@ UINT WINAPI GetCurrentDirectoryA( UINT buflen, LPSTR buf )
return
0
;
}
ret
=
GetCurrentDirectoryW
(
MAX_PATH
,
bufferW
);
ret
=
RtlGetCurrentDirectory_U
(
sizeof
(
bufferW
),
bufferW
);
if
(
!
ret
)
return
0
;
if
(
ret
>
MAX_PATH
)
if
(
ret
>
sizeof
(
bufferW
)
)
{
SetLastError
(
ERROR_FILENAME_EXCED_RANGE
);
return
0
;
...
...
@@ -1524,12 +1523,8 @@ BOOL WINAPI SetCurrentDirectoryW( LPCWSTR dir )
RtlInitUnicodeString
(
&
dirW
,
dir
);
status
=
RtlSetCurrentDirectory_U
(
&
dirW
);
if
(
status
!=
STATUS_SUCCESS
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
FALSE
;
}
return
TRUE
;
if
(
status
!=
STATUS_SUCCESS
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
status
;
}
...
...
@@ -1539,9 +1534,14 @@ BOOL WINAPI SetCurrentDirectoryW( LPCWSTR dir )
BOOL
WINAPI
SetCurrentDirectoryA
(
LPCSTR
dir
)
{
WCHAR
*
dirW
;
UNICODE_STRING
strW
;
NTSTATUS
status
;
if
(
!
(
dirW
=
FILE_name_AtoW
(
dir
,
FALSE
)))
return
FALSE
;
return
SetCurrentDirectoryW
(
dirW
);
RtlInitUnicodeString
(
&
strW
,
dirW
);
status
=
RtlSetCurrentDirectory_U
(
&
strW
);
if
(
status
!=
STATUS_SUCCESS
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
status
;
}
...
...
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