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
873799df
Commit
873799df
authored
Nov 10, 2007
by
Alex Villacís Lasso
Committed by
Alexandre Julliard
Nov 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fix returned value of LB_DIR.
parent
a4c9d96a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
listbox.c
dlls/user32/listbox.c
+16
-10
No files found.
dlls/user32/listbox.c
View file @
873799df
...
...
@@ -1815,6 +1815,7 @@ static LRESULT LISTBOX_Directory( LB_DESCR *descr, UINT attrib,
LRESULT
ret
=
LB_OKAY
;
WIN32_FIND_DATAW
entry
;
int
pos
;
LRESULT
maxinsert
=
LB_ERR
;
/* don't scan directory if we just want drives exclusively */
if
(
attrib
!=
(
DDL_DRIVES
|
DDL_EXCLUSIVE
))
{
...
...
@@ -1860,22 +1861,27 @@ static LRESULT LISTBOX_Directory( LB_DESCR *descr, UINT attrib,
pos
=
LISTBOX_FindFileStrPos
(
descr
,
buffer
);
if
((
ret
=
LISTBOX_InsertString
(
descr
,
pos
,
buffer
))
<
0
)
break
;
if
(
ret
<=
maxinsert
)
maxinsert
++
;
else
maxinsert
=
ret
;
}
while
(
FindNextFileW
(
handle
,
&
entry
));
FindClose
(
handle
);
}
}
/* scan drives */
if
((
ret
>=
0
)
&&
(
attrib
&
DDL_DRIVES
))
if
(
ret
>=
0
)
{
WCHAR
buffer
[]
=
{
'['
,
'-'
,
'a'
,
'-'
,
']'
,
0
}
;
WCHAR
root
[]
=
{
'A'
,
':'
,
'\\'
,
0
};
int
drive
;
for
(
drive
=
0
;
drive
<
26
;
drive
++
,
buffer
[
2
]
++
,
root
[
0
]
++
)
ret
=
maxinsert
;
/* scan drives */
if
(
attrib
&
DDL_DRIVES
)
{
if
(
GetDriveTypeW
(
root
)
<=
DRIVE_NO_ROOT_DIR
)
continue
;
if
((
ret
=
LISTBOX_InsertString
(
descr
,
-
1
,
buffer
))
<
0
)
break
;
WCHAR
buffer
[]
=
{
'['
,
'-'
,
'a'
,
'-'
,
']'
,
0
};
WCHAR
root
[]
=
{
'A'
,
':'
,
'\\'
,
0
};
int
drive
;
for
(
drive
=
0
;
drive
<
26
;
drive
++
,
buffer
[
2
]
++
,
root
[
0
]
++
)
{
if
(
GetDriveTypeW
(
root
)
<=
DRIVE_NO_ROOT_DIR
)
continue
;
if
((
ret
=
LISTBOX_InsertString
(
descr
,
-
1
,
buffer
))
<
0
)
break
;
}
}
}
return
ret
;
...
...
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