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
1fb22654
Commit
1fb22654
authored
Oct 20, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Oct 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Append the next directory to search to the current directory when recursing.
parent
4aca381f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
11 deletions
+21
-11
appsearch.c
dlls/msi/appsearch.c
+20
-7
package.c
dlls/msi/tests/package.c
+1
-4
No files found.
dlls/msi/appsearch.c
View file @
1fb22654
...
...
@@ -731,15 +731,18 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
WIN32_FIND_DATAW
findData
;
UINT
rc
=
ERROR_SUCCESS
;
size_t
dirLen
=
lstrlenW
(
dir
),
fileLen
=
lstrlenW
(
sig
->
File
);
WCHAR
subpath
[
MAX_PATH
];
WCHAR
*
buf
;
static
const
WCHAR
dot
[]
=
{
'.'
,
0
};
static
const
WCHAR
dotdot
[]
=
{
'.'
,
'.'
,
0
};
static
const
WCHAR
starDotStarW
[]
=
{
'*'
,
'.'
,
'*'
,
0
};
TRACE
(
"Searching directory %s for file %s, depth %d
\n
"
,
debugstr_w
(
dir
),
debugstr_w
(
sig
->
File
),
depth
);
if
(
depth
<
0
)
return
ERROR_
INVALID_PARAMETER
;
return
ERROR_
SUCCESS
;
*
appValue
=
NULL
;
/* We need the buffer in both paths below, so go ahead and allocate it
...
...
@@ -772,7 +775,7 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
FindClose
(
hFind
);
}
if
(
rc
==
ERROR_SUCCESS
&&
!*
appValue
&&
depth
>
0
)
if
(
rc
==
ERROR_SUCCESS
&&
!*
appValue
)
{
lstrcpyW
(
buf
,
dir
);
PathAddBackslashW
(
buf
);
...
...
@@ -781,18 +784,28 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
hFind
=
FindFirstFileW
(
buf
,
&
findData
);
if
(
hFind
!=
INVALID_HANDLE_VALUE
)
{
if
(
findData
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
if
(
findData
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
&&
lstrcmpW
(
findData
.
cFileName
,
dot
)
&&
lstrcmpW
(
findData
.
cFileName
,
dotdot
))
{
lstrcpyW
(
subpath
,
dir
);
PathAppendW
(
subpath
,
findData
.
cFileName
);
rc
=
ACTION_RecurseSearchDirectory
(
package
,
appValue
,
sig
,
findData
.
cFileName
,
depth
-
1
);
subpath
,
depth
-
1
);
}
while
(
rc
==
ERROR_SUCCESS
&&
!*
appValue
&&
FindNextFileW
(
hFind
,
&
findData
)
!=
0
)
{
if
(
!
lstrcmpW
(
findData
.
cFileName
,
dot
)
||
!
lstrcmpW
(
findData
.
cFileName
,
dotdot
))
continue
;
lstrcpyW
(
subpath
,
dir
);
PathAppendW
(
subpath
,
findData
.
cFileName
);
if
(
findData
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
rc
=
ACTION_RecurseSearchDirectory
(
package
,
appValue
,
sig
,
findData
.
cFileName
,
depth
-
1
);
sig
,
subpath
,
depth
-
1
);
}
FindClose
(
hFind
);
...
...
dlls/msi/tests/package.c
View file @
1fb22654
...
...
@@ -7158,10 +7158,7 @@ static void test_appsearch_drlocator(void)
sprintf
(
path
,
"%s
\\
one
\\
two
\\
three
\\
FileName2"
,
CURR_DIR
);
r
=
MsiGetPropertyA
(
hpkg
,
"SIGPROP5"
,
prop
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
!
lstrcmpA
(
prop
,
path
),
"Expected
\"
%s
\"
, got
\"
%s
\"\n
"
,
path
,
prop
);
}
ok
(
!
lstrcmpA
(
prop
,
path
),
"Expected
\"
%s
\"
, got
\"
%s
\"\n
"
,
path
,
prop
);
size
=
MAX_PATH
;
r
=
MsiGetPropertyA
(
hpkg
,
"SIGPROP6"
,
prop
,
&
size
);
...
...
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