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
7620bb36
Commit
7620bb36
authored
Oct 16, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Oct 16, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Append a backslash to the AppSearch registry path.
parent
3adf1e4e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
24 deletions
+35
-24
appsearch.c
dlls/msi/appsearch.c
+34
-20
package.c
dlls/msi/tests/package.c
+1
-4
No files found.
dlls/msi/appsearch.c
View file @
7620bb36
...
...
@@ -743,20 +743,21 @@ static UINT ACTION_SearchDirectory(MSIPACKAGE *package, MSISIGNATURE *sig,
LPCWSTR
path
,
int
depth
,
LPWSTR
*
appValue
)
{
UINT
rc
;
LPWSTR
val
=
NULL
;
TRACE
(
"%p, %p, %s, %d, %p
\n
"
,
package
,
sig
,
debugstr_w
(
path
),
depth
,
appValue
);
if
(
ACTION_IsFullPath
(
path
))
{
if
(
sig
->
File
)
rc
=
ACTION_RecurseSearchDirectory
(
package
,
appValue
,
sig
,
path
,
depth
);
rc
=
ACTION_RecurseSearchDirectory
(
package
,
&
val
,
sig
,
path
,
depth
);
else
{
/* Recursively searching a directory makes no sense when the
* directory to search is the thing you're trying to find.
*/
rc
=
ACTION_CheckDirectory
(
package
,
path
,
appValue
);
rc
=
ACTION_CheckDirectory
(
package
,
path
,
&
val
);
}
}
else
...
...
@@ -766,24 +767,37 @@ static UINT ACTION_SearchDirectory(MSIPACKAGE *package, MSISIGNATURE *sig,
int
i
;
rc
=
ERROR_SUCCESS
;
*
appValue
=
NULL
;
for
(
i
=
0
;
rc
==
ERROR_SUCCESS
&&
!*
appValue
&&
i
<
26
;
i
++
)
if
(
drives
&
(
1
<<
i
))
{
pathWithDrive
[
0
]
=
'A'
+
i
;
if
(
GetDriveTypeW
(
pathWithDrive
)
==
DRIVE_FIXED
)
{
lstrcpynW
(
pathWithDrive
+
3
,
path
,
sizeof
(
pathWithDrive
)
/
sizeof
(
pathWithDrive
[
0
])
-
3
);
if
(
sig
->
File
)
rc
=
ACTION_RecurseSearchDirectory
(
package
,
appValue
,
sig
,
pathWithDrive
,
depth
);
else
rc
=
ACTION_CheckDirectory
(
package
,
pathWithDrive
,
appValue
);
}
}
for
(
i
=
0
;
rc
==
ERROR_SUCCESS
&&
!
val
&&
i
<
26
;
i
++
)
{
if
(
!
(
drives
&
(
1
<<
i
)))
continue
;
pathWithDrive
[
0
]
=
'A'
+
i
;
if
(
GetDriveTypeW
(
pathWithDrive
)
!=
DRIVE_FIXED
)
continue
;
lstrcpynW
(
pathWithDrive
+
3
,
path
,
sizeof
(
pathWithDrive
)
/
sizeof
(
pathWithDrive
[
0
])
-
3
);
if
(
sig
->
File
)
rc
=
ACTION_RecurseSearchDirectory
(
package
,
&
val
,
sig
,
pathWithDrive
,
depth
);
else
rc
=
ACTION_CheckDirectory
(
package
,
pathWithDrive
,
&
val
);
}
}
if
(
val
&&
val
[
lstrlenW
(
val
)
-
1
]
!=
'\\'
)
{
val
=
msi_realloc
(
val
,
(
lstrlenW
(
val
)
+
2
)
*
sizeof
(
WCHAR
));
if
(
!
val
)
rc
=
ERROR_OUTOFMEMORY
;
else
PathAddBackslashW
(
val
);
}
*
appValue
=
val
;
TRACE
(
"returning %d
\n
"
,
rc
);
return
rc
;
}
...
...
dlls/msi/tests/package.c
View file @
7620bb36
...
...
@@ -6379,10 +6379,7 @@ static void test_appsearch_reglocator(void)
sprintf
(
path
,
"%s
\\
"
,
CURR_DIR
);
r
=
MsiGetPropertyA
(
hpkg
,
"SIGPROP13"
,
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
,
"SIGPROP14"
,
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