Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
0dce5b75
Commit
0dce5b75
authored
26 years ago
by
Petter Reinholdtsen
Committed by
Alexandre Julliard
26 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix: Changed GetDriveType32A(NULL) to use cwd's root.
parent
b05264fe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
files/drive.c
+18
-15
18 additions, 15 deletions
files/drive.c
with
18 additions
and
15 deletions
files/drive.c
+
18
−
15
View file @
0dce5b75
...
...
@@ -785,30 +785,33 @@ UINT16 WINAPI GetDriveType16(
* DRIVE_CDROM CDROM drive
* DRIVE_RAMDISK virtual disk in ram
*
* DRIVE_DOESNOTEXIST XXX Not valid return value
* DRIVE_DOESNOTEXIST XXX Not valid return value
* DRIVE_CANNOTDETERMINE XXX Not valid return value
*
* BUGS
*
* Currently returns DRIVE_DOESNOTEXIST when it really should return
* DRIVE_UNKNOWN or DRIVE_NO_ROOT_DIR. DRIVE_RAMDISK is unsupported.
* Should determine current directory and use that root if param is
* NULL.
* Currently returns DRIVE_DOESNOTEXIST and DRIVE_CANNOTDETERMINE
* when it really should return DRIVE_NO_ROOT_DIR and DRIVE_UNKNOWN.
* Why where the former defines used?
*
* DRIVE_RAMDISK is unsupported.
*/
UINT32
WINAPI
GetDriveType32A
(
LPCSTR
root
/* String describing drive */
)
{
TRACE
(
dosfs
,
"(%s)
\n
"
,
NULL
!=
root
?
root
:
"NULL"
);
if
(
NULL
==
root
)
{
FIXME
(
dosfs
,
"(NULL) should use current dir, hardcoded c: instead
\n
"
);
root
=
"C:"
;
}
int
drive
;
TRACE
(
dosfs
,
"(%s)
\n
"
,
debugstr_a
(
root
));
if
((
root
[
1
])
&&
(
root
[
1
]
!=
':'
))
if
(
NULL
==
root
)
drive
=
DRIVE_GetCurrentDrive
();
else
{
WARN
(
dosfs
,
"invalid root '%s'
\n
"
,
NULL
!=
root
?
root
:
"NULL"
);
return
DRIVE_DOESNOTEXIST
;
if
((
root
[
1
])
&&
(
root
[
1
]
!=
':'
))
{
WARN
(
dosfs
,
"invalid root '%s'
\n
"
,
debugstr_a
(
root
));
return
DRIVE_DOESNOTEXIST
;
}
drive
=
toupper
(
root
[
0
])
-
'A'
;
}
switch
(
DRIVE_GetType
(
toupper
(
root
[
0
])
-
'A'
))
switch
(
DRIVE_GetType
(
drive
))
{
case
TYPE_FLOPPY
:
return
DRIVE_REMOVABLE
;
case
TYPE_HD
:
return
DRIVE_FIXED
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment