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
0f86dd93
Commit
0f86dd93
authored
Feb 20, 2006
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Fix SymFindFileInPath to return files matching the requested
criteria (it was mainly doing the opposite).
parent
00f24902
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
path.c
dlls/dbghelp/path.c
+13
-6
No files found.
dlls/dbghelp/path.c
View file @
0f86dd93
...
...
@@ -220,11 +220,17 @@ struct sffip
void
*
user
;
};
/* checks that buffer (as found by matching the name) matches the info
* (information is based on file type)
* returns TRUE when file is found, FALSE to continue searching
* (NB this is the opposite conventions as for SymFindFileInPathProc)
*/
static
BOOL
CALLBACK
sffip_cb
(
LPCSTR
buffer
,
void
*
user
)
{
struct
sffip
*
s
=
(
struct
sffip
*
)
user
;
DWORD
size
,
checksum
;
DWORD_PTR
timestamp
;
/* FIXME: should check that id/two/three match the file pointed
* by buffer
*/
...
...
@@ -239,7 +245,7 @@ static BOOL CALLBACK sffip_cb(LPCSTR buffer, void* user)
size
=
~
s
->
two
;
hFile
=
CreateFileA
(
buffer
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
hFile
==
INVALID_HANDLE_VALUE
)
return
TRU
E
;
if
(
hFile
==
INVALID_HANDLE_VALUE
)
return
FALS
E
;
if
((
hMap
=
CreateFileMappingA
(
hFile
,
NULL
,
PAGE_READONLY
,
0
,
0
,
NULL
))
!=
NULL
)
{
if
((
mapping
=
MapViewOfFile
(
hMap
,
FILE_MAP_READ
,
0
,
0
,
0
))
!=
NULL
)
...
...
@@ -255,7 +261,7 @@ static BOOL CALLBACK sffip_cb(LPCSTR buffer, void* user)
if
(
timestamp
!=
(
DWORD_PTR
)
s
->
id
||
size
!=
s
->
two
)
{
WARN
(
"Found %s, but wrong size or timestamp
\n
"
,
buffer
);
return
TRU
E
;
return
FALS
E
;
}
}
break
;
...
...
@@ -266,13 +272,13 @@ static BOOL CALLBACK sffip_cb(LPCSTR buffer, void* user)
{
WARN
(
"Found %s, but wrong checksums: %08lx %08lx
\n
"
,
buffer
,
checksum
,
(
DWORD_PTR
)
s
->
id
);
return
TRU
E
;
return
FALS
E
;
}
}
else
{
WARN
(
"Couldn't read %s
\n
"
,
buffer
);
return
TRU
E
;
return
FALS
E
;
}
break
;
case
DMT_PDB
:
...
...
@@ -281,7 +287,7 @@ static BOOL CALLBACK sffip_cb(LPCSTR buffer, void* user)
break
;
default:
FIXME
(
"What the heck??
\n
"
);
return
TRU
E
;
return
FALS
E
;
}
/* yes, EnumDirTree/do_search and SymFindFileInPath callbacks use the opposite
* convention to stop/continue enumeration. sigh.
...
...
@@ -342,7 +348,8 @@ BOOL WINAPI SymFindFileInPath(HANDLE hProcess, PCSTR searchPath, PCSTR full_path
strcpy
(
tmp
,
searchPath
);
searchPath
=
NULL
;
}
if
(
do_search
(
filename
,
tmp
,
FALSE
,
sffip_cb
,
&
s
))
{
if
(
do_search
(
filename
,
tmp
,
FALSE
,
sffip_cb
,
&
s
))
{
strcpy
(
buffer
,
tmp
);
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