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
fe6dfb05
Commit
fe6dfb05
authored
Oct 11, 1998
by
Andreas Mohr
Committed by
Alexandre Julliard
Oct 11, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed severe bug: SetCurrentDirectory32A didn't set pTask->curdir
correctly due to current drive being set too late.
parent
927875fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
drive.c
files/drive.c
+12
-9
No files found.
files/drive.c
View file @
fe6dfb05
...
...
@@ -894,7 +894,7 @@ BOOL16 WINAPI SetCurrentDirectory16( LPCSTR dir )
*/
BOOL32
WINAPI
SetCurrentDirectory32A
(
LPCSTR
dir
)
{
int
drive
=
DRIVE_GetCurrentDrive
();
int
olddrive
,
drive
=
DRIVE_GetCurrentDrive
();
if
(
!
dir
)
{
ERR
(
file
,
"(NULL)!
\n
"
);
...
...
@@ -903,17 +903,20 @@ BOOL32 WINAPI SetCurrentDirectory32A( LPCSTR dir )
if
(
dir
[
0
]
&&
(
dir
[
1
]
==
':'
))
{
drive
=
tolower
(
*
dir
)
-
'a'
;
if
(
!
DRIVE_IsValid
(
drive
))
{
DOS_ERROR
(
ER_InvalidDrive
,
EC_MediaError
,
SA_Abort
,
EL_Disk
);
return
FALSE
;
}
dir
+=
2
;
}
/* WARNING: we need to set the drive before the dir, as DRIVE_Chdir
sets pTask->curdir only if pTask->curdrive is drive */
olddrive
=
drive
;
/* in case DRIVE_Chdir fails */
if
(
!
(
DRIVE_SetCurrentDrive
(
drive
)))
return
FALSE
;
/* FIXME: what about empty strings? Add a \\ ? */
if
(
!
DRIVE_Chdir
(
drive
,
dir
))
return
FALSE
;
if
(
drive
==
DRIVE_GetCurrentDrive
())
return
TRUE
;
return
DRIVE_SetCurrentDrive
(
drive
);
if
(
!
DRIVE_Chdir
(
drive
,
dir
))
{
DRIVE_SetCurrentDrive
(
olddrive
);
return
FALSE
;
}
return
TRUE
;
}
...
...
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